From ab359d1262394f719cf927a9821f2e3e5994b704 Mon Sep 17 00:00:00 2001 From: Gabriel Aszalos Date: Thu, 18 Oct 2018 12:27:47 +0200 Subject: [PATCH] config: remove duplicated APIEnabled field --- config/agent.go | 4 +--- writer/writer.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/agent.go b/config/agent.go index 50b58eed7..fbd04e84d 100644 --- a/config/agent.go +++ b/config/agent.go @@ -40,7 +40,6 @@ type AgentConfig struct { // API APIEndpoint string APIKey string `json:"-"` // never publish this - APIEnabled bool // Concentrator BucketInterval time.Duration // the size of our pre-aggregation per bucket @@ -109,7 +108,6 @@ func New() *AgentConfig { DefaultEnv: "none", APIEndpoint: "https://trace.agent.datadoghq.com", APIKey: "", - APIEnabled: true, BucketInterval: time.Duration(10) * time.Second, ExtraAggregators: []string{"http.status_code"}, @@ -137,7 +135,7 @@ func New() *AgentConfig { MaxConnections: 200, // in practice, rarely goes over 20 WatchdogInterval: time.Minute, - Ignore: make(map[string][]string), + Ignore: make(map[string][]string), AnalyzedRateByServiceLegacy: make(map[string]float64), AnalyzedSpansByService: make(map[string]map[string]float64), } diff --git a/writer/writer.go b/writer/writer.go index bc9a5a4f1..5f2087b58 100644 --- a/writer/writer.go +++ b/writer/writer.go @@ -20,7 +20,7 @@ type BaseWriter struct { func NewBaseWriter(conf *config.AgentConfig, path string, senderFactory func(Endpoint) PayloadSender) *BaseWriter { var endpoint Endpoint - if conf.APIEnabled { + if conf.Enabled { client := NewClient(conf) endpoint = NewDatadogEndpoint(client, conf.APIEndpoint, path, conf.APIKey) } else {