Disable collect data by default.
This commit is contained in:
parent
e70c8a7b46
commit
47a9b086ea
4 changed files with 10 additions and 39 deletions
|
@ -286,24 +286,16 @@ func checkNewVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func stats(staticConfiguration *static.Configuration) {
|
func stats(staticConfiguration *static.Configuration) {
|
||||||
if staticConfiguration.Global.SendAnonymousUsage == nil {
|
logger := log.WithoutContext()
|
||||||
log.WithoutContext().Error(`
|
|
||||||
You haven't specified the sendAnonymousUsage option, it will be enabled by default.
|
|
||||||
`)
|
|
||||||
sendAnonymousUsage := true
|
|
||||||
staticConfiguration.Global.SendAnonymousUsage = &sendAnonymousUsage
|
|
||||||
}
|
|
||||||
|
|
||||||
if *staticConfiguration.Global.SendAnonymousUsage {
|
if staticConfiguration.Global.SendAnonymousUsage {
|
||||||
log.WithoutContext().Info(`
|
logger.Info(`Stats collection is enabled.`)
|
||||||
Stats collection is enabled.
|
logger.Info(`Many thanks for contributing to Traefik's improvement by allowing us to receive anonymous information from your configuration.`)
|
||||||
Many thanks for contributing to Traefik's improvement by allowing us to receive anonymous information from your configuration.
|
logger.Info(`Help us improve Traefik by leaving this feature on :)`)
|
||||||
Help us improve Traefik by leaving this feature on :)
|
logger.Info(`More details on: https://docs.traefik.io/v2.0/contributing/data-collection/`)
|
||||||
More details on: https://docs.traefik.io/v2.0/contributing/data-collection/
|
|
||||||
`)
|
|
||||||
collect(staticConfiguration)
|
collect(staticConfiguration)
|
||||||
} else {
|
} else {
|
||||||
log.WithoutContext().Info(`
|
logger.Info(`
|
||||||
Stats collection is disabled.
|
Stats collection is disabled.
|
||||||
Help us improve Traefik by turning this feature on :)
|
Help us improve Traefik by turning this feature on :)
|
||||||
More details on: https://docs.traefik.io/v2.0/contributing/data-collection/
|
More details on: https://docs.traefik.io/v2.0/contributing/data-collection/
|
||||||
|
|
|
@ -8,9 +8,6 @@ Understanding How Traefik is Being Used
|
||||||
Understanding how you use Traefik is very important to us: it helps us improve the solution in many different ways.
|
Understanding how you use Traefik is very important to us: it helps us improve the solution in many different ways.
|
||||||
For this very reason, the sendAnonymousUsage option is mandatory: we want you to take time to consider whether or not you wish to share anonymous data with us so we can benefit from your experience and use cases.
|
For this very reason, the sendAnonymousUsage option is mandatory: we want you to take time to consider whether or not you wish to share anonymous data with us so we can benefit from your experience and use cases.
|
||||||
|
|
||||||
!!! warning
|
|
||||||
Before the GA, leaving this option unset will not prevent Traefik from running but will generate an error log indicating that it enables data collection by default.
|
|
||||||
|
|
||||||
!!! example "Enabling Data Collection"
|
!!! example "Enabling Data Collection"
|
||||||
|
|
||||||
```toml tab="File (TOML)"
|
```toml tab="File (TOML)"
|
||||||
|
@ -71,14 +68,6 @@ Once a day (the first call begins 10 minutes after the start of Traefik), we col
|
||||||
cert = "dockerCert"
|
cert = "dockerCert"
|
||||||
key = "dockerKey"
|
key = "dockerKey"
|
||||||
insecureSkipVerify = true
|
insecureSkipVerify = true
|
||||||
|
|
||||||
[providers.ecs]
|
|
||||||
domain = "foo.bar"
|
|
||||||
exposedByDefault = true
|
|
||||||
clusters = ["foo-bar"]
|
|
||||||
region = "us-west-2"
|
|
||||||
accessKeyID = "AccessKeyID"
|
|
||||||
secretAccessKey = "SecretAccessKey"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
??? example "Resulting Obfuscated Configuration"
|
??? example "Resulting Obfuscated Configuration"
|
||||||
|
@ -92,7 +81,6 @@ Once a day (the first call begins 10 minutes after the start of Traefik), we col
|
||||||
|
|
||||||
[providers.docker]
|
[providers.docker]
|
||||||
endpoint = "xxxx"
|
endpoint = "xxxx"
|
||||||
domain = "xxxx"
|
|
||||||
exposedByDefault = true
|
exposedByDefault = true
|
||||||
swarmMode = true
|
swarmMode = true
|
||||||
|
|
||||||
|
@ -101,14 +89,6 @@ Once a day (the first call begins 10 minutes after the start of Traefik), we col
|
||||||
cert = "xxxx"
|
cert = "xxxx"
|
||||||
key = "xxxx"
|
key = "xxxx"
|
||||||
insecureSkipVerify = false
|
insecureSkipVerify = false
|
||||||
|
|
||||||
[providers.ecs]
|
|
||||||
domain = "xxxx"
|
|
||||||
exposedByDefault = true
|
|
||||||
clusters = []
|
|
||||||
region = "us-west-2"
|
|
||||||
accessKeyID = "xxxx"
|
|
||||||
secretAccessKey = "xxxx"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## The Code for Data Collection
|
## The Code for Data Collection
|
||||||
|
|
|
@ -26,10 +26,9 @@ import (
|
||||||
func TestDo_globalConfiguration(t *testing.T) {
|
func TestDo_globalConfiguration(t *testing.T) {
|
||||||
config := &static.Configuration{}
|
config := &static.Configuration{}
|
||||||
|
|
||||||
sendAnonymousUsage := true
|
|
||||||
config.Global = &static.Global{
|
config.Global = &static.Global{
|
||||||
CheckNewVersion: true,
|
CheckNewVersion: true,
|
||||||
SendAnonymousUsage: &sendAnonymousUsage,
|
SendAnonymousUsage: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
config.AccessLog = &types.AccessLog{
|
config.AccessLog = &types.AccessLog{
|
||||||
|
|
|
@ -72,7 +72,7 @@ type CertificateResolver struct {
|
||||||
// Global holds the global configuration.
|
// Global holds the global configuration.
|
||||||
type Global struct {
|
type Global struct {
|
||||||
CheckNewVersion bool `description:"Periodically check if a new version has been released." json:"checkNewVersion,omitempty" toml:"checkNewVersion,omitempty" yaml:"checkNewVersion,omitempty" label:"allowEmpty" export:"true"`
|
CheckNewVersion bool `description:"Periodically check if a new version has been released." json:"checkNewVersion,omitempty" toml:"checkNewVersion,omitempty" yaml:"checkNewVersion,omitempty" label:"allowEmpty" export:"true"`
|
||||||
SendAnonymousUsage *bool `description:"Periodically send anonymous usage statistics. If the option is not specified, it will be enabled by default." json:"sendAnonymousUsage,omitempty" toml:"sendAnonymousUsage,omitempty" yaml:"sendAnonymousUsage,omitempty" label:"allowEmpty" export:"true"`
|
SendAnonymousUsage bool `description:"Periodically send anonymous usage statistics. If the option is not specified, it will be enabled by default." json:"sendAnonymousUsage,omitempty" toml:"sendAnonymousUsage,omitempty" yaml:"sendAnonymousUsage,omitempty" label:"allowEmpty" export:"true"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServersTransport options to configure communication between Traefik and the servers
|
// ServersTransport options to configure communication between Traefik and the servers
|
||||||
|
|
Loading…
Reference in a new issue