Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

config: remove duplicated APIEnabled field #498

Merged
merged 1 commit into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions config/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"},
Expand Down Expand Up @@ -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),
}
Expand Down
2 changes: 1 addition & 1 deletion writer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down