From af04e92cf20c180dd6d701359bd05a75f1aebb94 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 30 Oct 2020 16:54:04 +0100 Subject: [PATCH] Enable stats collection when pilot is enabled --- docs/content/contributing/data-collection.md | 2 ++ pkg/config/static/static_config.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/docs/content/contributing/data-collection.md b/docs/content/contributing/data-collection.md index e82f4812a..0f8e6078b 100644 --- a/docs/content/contributing/data-collection.md +++ b/docs/content/contributing/data-collection.md @@ -31,6 +31,8 @@ For this very reason, the sendAnonymousUsage option is mandatory: we want you to This feature comes from the public proposal [here](https://github.com/traefik/traefik/issues/2369). +This feature is activated when using Traefik Pilot to better understand the community's need, and also to get information about plug-ins popularity. + In order to help us learn more about how Traefik is being used and improve it, we collect anonymous usage statistics from running instances. Those data help us prioritize our developments and focus on what's important for our users (for example, which provider is popular, and which is not). diff --git a/pkg/config/static/static_config.go b/pkg/config/static/static_config.go index e26a620a2..ddd91613c 100644 --- a/pkg/config/static/static_config.go +++ b/pkg/config/static/static_config.go @@ -224,6 +224,11 @@ func (c *Configuration) SetEffectiveConfiguration() { } } + // Enable anonymous usage when pilot is enabled. + if c.Pilot != nil && c.Pilot.Token != "" { + c.Global.SendAnonymousUsage = true + } + c.initACMEProvider() }