From dc72c91ae49f164421705f143b7e53d5fb94279d Mon Sep 17 00:00:00 2001 From: Stanley Liu Date: Fri, 5 Jan 2024 10:01:46 -0500 Subject: [PATCH] Convert pkg/config/utils and comp/logs/agent/config to modules (#21831) * Move endpoints and api_key to config/setup * Convert comp/logs/agent/config into module * Add to modules.py * Convert pkg/config/utils into module * Refactor code to use pkgconfigutils * Update tests to use suite.config instead of global config * Add missing replaces --- comp/dogstatsd/packets/pool.go | 3 +- comp/dogstatsd/server/float64_list_pool.go | 3 +- comp/dogstatsd/server/intern.go | 3 +- comp/logs/agent/config/config.go | 40 +- comp/logs/agent/config/config_keys.go | 59 +-- comp/logs/agent/config/config_test.go | 160 ++++---- comp/logs/agent/config/endpoints.go | 12 +- comp/logs/agent/config/endpoints_test.go | 16 +- comp/logs/agent/config/go.mod | 85 +++++ comp/logs/agent/config/go.sum | 353 ++++++++++++++++++ comp/logs/agent/config/integration_config.go | 4 +- go.mod | 6 +- pkg/aggregator/demultiplexer_agent.go | 2 +- pkg/aggregator/demultiplexer_serverless.go | 2 +- pkg/collector/check/stats/stats.go | 5 +- pkg/collector/corechecks/checkbase.go | 3 +- pkg/collector/corechecks/embed/apm.go | 2 +- pkg/collector/corechecks/embed/jmx/check.go | 3 +- .../corechecks/embed/process_agent.go | 2 +- pkg/collector/python/check.go | 2 +- pkg/config/utils/endpoints.go | 17 +- pkg/config/utils/endpoints_test.go | 36 +- pkg/config/utils/go.mod | 72 ++++ pkg/config/utils/go.sum | 343 +++++++++++++++++ pkg/config/utils/metadata_providers.go | 4 +- pkg/config/utils/miscellaneous.go | 4 +- pkg/config/utils/tags.go | 6 +- pkg/config/utils/tags_test.go | 16 +- pkg/config/utils/telemetry.go | 16 +- pkg/config/utils/telemetry_test.go | 32 +- pkg/config/utils/trace.go | 4 +- tasks/modules.py | 2 + 32 files changed, 1098 insertions(+), 219 deletions(-) create mode 100644 comp/logs/agent/config/go.mod create mode 100644 comp/logs/agent/config/go.sum create mode 100644 pkg/config/utils/go.mod create mode 100644 pkg/config/utils/go.sum diff --git a/comp/dogstatsd/packets/pool.go b/comp/dogstatsd/packets/pool.go index 9c419cfe22886..56f8eac205473 100644 --- a/comp/dogstatsd/packets/pool.go +++ b/comp/dogstatsd/packets/pool.go @@ -8,6 +8,7 @@ package packets import ( "sync" + "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/config/utils" ) @@ -41,7 +42,7 @@ func NewPool(bufferSize int) *Pool { }, }, // telemetry - tlmEnabled: utils.IsTelemetryEnabled(), + tlmEnabled: utils.IsTelemetryEnabled(config.Datadog), } } diff --git a/comp/dogstatsd/server/float64_list_pool.go b/comp/dogstatsd/server/float64_list_pool.go index 5793934e7ae74..a821510b60b4c 100644 --- a/comp/dogstatsd/server/float64_list_pool.go +++ b/comp/dogstatsd/server/float64_list_pool.go @@ -8,6 +8,7 @@ package server import ( "sync" + "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/telemetry" ) @@ -42,7 +43,7 @@ func newFloat64ListPool() *float64ListPool { }, }, // telemetry - tlmEnabled: utils.IsTelemetryEnabled(), + tlmEnabled: utils.IsTelemetryEnabled(config.Datadog), } } diff --git a/comp/dogstatsd/server/intern.go b/comp/dogstatsd/server/intern.go index 93a00dca2d07d..cd562db03e174 100644 --- a/comp/dogstatsd/server/intern.go +++ b/comp/dogstatsd/server/intern.go @@ -8,6 +8,7 @@ package server import ( "fmt" + "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/telemetry" ) @@ -62,7 +63,7 @@ func newStringInterner(maxSize int, internerID int) *stringInterner { id: fmt.Sprintf("interner_%d", internerID), maxSize: maxSize, telemetry: siTelemetry{ - enabled: utils.IsTelemetryEnabled(), + enabled: utils.IsTelemetryEnabled(config.Datadog), }, } diff --git a/comp/logs/agent/config/config.go b/comp/logs/agent/config/config.go index bde99373c71c6..f13fd5ba84c69 100644 --- a/comp/logs/agent/config/config.go +++ b/comp/logs/agent/config/config.go @@ -14,8 +14,8 @@ import ( "strings" "time" - pkgConfig "github.com/DataDog/datadog-agent/pkg/config" - "github.com/DataDog/datadog-agent/pkg/config/utils" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + pkgconfigutils "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/util/log" "github.com/DataDog/datadog-agent/pkg/util/pointer" ) @@ -61,7 +61,7 @@ var ( ) // GlobalProcessingRules returns the global processing rules to apply to all logs. -func GlobalProcessingRules(coreConfig pkgConfig.Reader) ([]*ProcessingRule, error) { +func GlobalProcessingRules(coreConfig pkgconfigmodel.Reader) ([]*ProcessingRule, error) { var rules []*ProcessingRule var err error raw := coreConfig.Get("logs_config.processing_rules") @@ -98,17 +98,17 @@ func HasMultiLineRule(rules []*ProcessingRule) bool { } // BuildEndpoints returns the endpoints to send logs. -func BuildEndpoints(coreConfig pkgConfig.Reader, httpConnectivity HTTPConnectivity, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { +func BuildEndpoints(coreConfig pkgconfigmodel.Reader, httpConnectivity HTTPConnectivity, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { return BuildEndpointsWithConfig(coreConfig, defaultLogsConfigKeys(coreConfig), httpEndpointPrefix, httpConnectivity, intakeTrackType, intakeProtocol, intakeOrigin) } // BuildEndpointsWithVectorOverride returns the endpoints to send logs and enforce Vector override config keys -func BuildEndpointsWithVectorOverride(coreConfig pkgConfig.Reader, httpConnectivity HTTPConnectivity, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { +func BuildEndpointsWithVectorOverride(coreConfig pkgconfigmodel.Reader, httpConnectivity HTTPConnectivity, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { return BuildEndpointsWithConfig(coreConfig, defaultLogsConfigKeysWithVectorOverride(coreConfig), httpEndpointPrefix, httpConnectivity, intakeTrackType, intakeProtocol, intakeOrigin) } // BuildEndpointsWithConfig returns the endpoints to send logs. -func BuildEndpointsWithConfig(coreConfig pkgConfig.Reader, logsConfig *LogsConfigKeys, endpointPrefix string, httpConnectivity HTTPConnectivity, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { +func BuildEndpointsWithConfig(coreConfig pkgconfigmodel.Reader, logsConfig *LogsConfigKeys, endpointPrefix string, httpConnectivity HTTPConnectivity, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { if logsConfig.devModeNoSSL() { log.Warnf("Use of illegal configuration parameter, if you need to send your logs to a proxy, "+ "please use '%s' and '%s' instead", logsConfig.getConfigKey("logs_dd_url"), logsConfig.getConfigKey("logs_no_ssl")) @@ -124,21 +124,21 @@ func BuildEndpointsWithConfig(coreConfig pkgConfig.Reader, logsConfig *LogsConfi } // BuildServerlessEndpoints returns the endpoints to send logs for the Serverless agent. -func BuildServerlessEndpoints(coreConfig pkgConfig.Reader, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol) (*Endpoints, error) { +func BuildServerlessEndpoints(coreConfig pkgconfigmodel.Reader, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol) (*Endpoints, error) { return BuildHTTPEndpointsWithConfig(coreConfig, defaultLogsConfigKeysWithVectorOverride(coreConfig), serverlessHTTPEndpointPrefix, intakeTrackType, intakeProtocol, ServerlessIntakeOrigin) } // ExpectedTagsDuration returns a duration of the time expected tags will be submitted for. -func ExpectedTagsDuration(coreConfig pkgConfig.Reader) time.Duration { +func ExpectedTagsDuration(coreConfig pkgconfigmodel.Reader) time.Duration { return defaultLogsConfigKeys(coreConfig).expectedTagsDuration() } // IsExpectedTagsSet returns boolean showing if expected tags feature is enabled. -func IsExpectedTagsSet(coreConfig pkgConfig.Reader) bool { +func IsExpectedTagsSet(coreConfig pkgconfigmodel.Reader) bool { return ExpectedTagsDuration(coreConfig) > 0 } -func buildTCPEndpoints(coreConfig pkgConfig.Reader, logsConfig *LogsConfigKeys) (*Endpoints, error) { +func buildTCPEndpoints(coreConfig pkgconfigmodel.Reader, logsConfig *LogsConfigKeys) (*Endpoints, error) { useProto := logsConfig.devModeUseProto() proxyAddress := logsConfig.socks5ProxyAddress() main := Endpoint{ @@ -166,7 +166,7 @@ func buildTCPEndpoints(coreConfig pkgConfig.Reader, logsConfig *LogsConfigKeys) } else { // If no proxy is set, we default to 'logs_config.dd_url' if set, or to 'site'. // if none of them is set, we default to the US agent endpoint. - main.Host = utils.GetMainEndpoint(coreConfig, tcpEndpointPrefix, logsConfig.getConfigKey("dd_url")) + main.Host = pkgconfigutils.GetMainEndpoint(coreConfig, tcpEndpointPrefix, logsConfig.getConfigKey("dd_url")) if port, found := logsEndpoints[main.Host]; found { main.Port = port } else { @@ -181,23 +181,23 @@ func buildTCPEndpoints(coreConfig pkgConfig.Reader, logsConfig *LogsConfigKeys) additionals[i].UseSSL = main.UseSSL } additionals[i].ProxyAddress = proxyAddress - additionals[i].APIKey = utils.SanitizeAPIKey(additionals[i].APIKey) + additionals[i].APIKey = pkgconfigutils.SanitizeAPIKey(additionals[i].APIKey) } return NewEndpoints(main, additionals, useProto, false), nil } // BuildHTTPEndpoints returns the HTTP endpoints to send logs to. -func BuildHTTPEndpoints(coreConfig pkgConfig.Reader, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { +func BuildHTTPEndpoints(coreConfig pkgconfigmodel.Reader, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { return BuildHTTPEndpointsWithConfig(coreConfig, defaultLogsConfigKeys(coreConfig), httpEndpointPrefix, intakeTrackType, intakeProtocol, intakeOrigin) } // BuildHTTPEndpointsWithVectorOverride returns the HTTP endpoints to send logs to. -func BuildHTTPEndpointsWithVectorOverride(coreConfig pkgConfig.Reader, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { +func BuildHTTPEndpointsWithVectorOverride(coreConfig pkgconfigmodel.Reader, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { return BuildHTTPEndpointsWithConfig(coreConfig, defaultLogsConfigKeysWithVectorOverride(coreConfig), httpEndpointPrefix, intakeTrackType, intakeProtocol, intakeOrigin) } // BuildHTTPEndpointsWithConfig uses two arguments that instructs it how to access configuration parameters, then returns the HTTP endpoints to send logs to. This function is able to default to the 'classic' BuildHTTPEndpoints() w ldHTTPEndpointsWithConfigdefault variables logsConfigDefaultKeys and httpEndpointPrefix -func BuildHTTPEndpointsWithConfig(coreConfig pkgConfig.Reader, logsConfig *LogsConfigKeys, endpointPrefix string, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { +func BuildHTTPEndpointsWithConfig(coreConfig pkgconfigmodel.Reader, logsConfig *LogsConfigKeys, endpointPrefix string, intakeTrackType IntakeTrackType, intakeProtocol IntakeProtocol, intakeOrigin IntakeOrigin) (*Endpoints, error) { // Provide default values for legacy settings when the configuration key does not exist defaultNoSSL := logsConfig.logsNoSSL() @@ -240,7 +240,7 @@ func BuildHTTPEndpointsWithConfig(coreConfig pkgConfig.Reader, logsConfig *LogsC main.Port = port *main.UseSSL = useSSL } else { - addr := utils.GetMainEndpoint(coreConfig, endpointPrefix, logsConfig.getConfigKey("dd_url")) + addr := pkgconfigutils.GetMainEndpoint(coreConfig, endpointPrefix, logsConfig.getConfigKey("dd_url")) host, port, useSSL, err := parseAddressWithScheme(addr, logsConfig.devModeNoSSL(), parseAddressAsHost) if err != nil { return nil, fmt.Errorf("could not parse %s: %v", logsDDURL, err) @@ -256,7 +256,7 @@ func BuildHTTPEndpointsWithConfig(coreConfig pkgConfig.Reader, logsConfig *LogsC if additionals[i].UseSSL == nil { additionals[i].UseSSL = main.UseSSL } - additionals[i].APIKey = utils.SanitizeAPIKey(additionals[i].APIKey) + additionals[i].APIKey = pkgconfigutils.SanitizeAPIKey(additionals[i].APIKey) additionals[i].UseCompression = main.UseCompression additionals[i].CompressionLevel = main.CompressionLevel additionals[i].BackoffBase = main.BackoffBase @@ -346,16 +346,16 @@ func parseAddressAsHost(address string) (string, int, error) { } // TaggerWarmupDuration is used to configure the tag providers -func TaggerWarmupDuration(coreConfig pkgConfig.Reader) time.Duration { +func TaggerWarmupDuration(coreConfig pkgconfigmodel.Reader) time.Duration { return defaultLogsConfigKeys(coreConfig).taggerWarmupDuration() } // AggregationTimeout is used when performing aggregation operations -func AggregationTimeout(coreConfig pkgConfig.Reader) time.Duration { +func AggregationTimeout(coreConfig pkgconfigmodel.Reader) time.Duration { return defaultLogsConfigKeys(coreConfig).aggregationTimeout() } // MaxMessageSizeBytes is used to cap the maximum log message size in bytes -func MaxMessageSizeBytes(coreConfig pkgConfig.Reader) int { +func MaxMessageSizeBytes(coreConfig pkgconfigmodel.Reader) int { return defaultLogsConfigKeys(coreConfig).maxMessageSizeBytes() } diff --git a/comp/logs/agent/config/config_keys.go b/comp/logs/agent/config/config_keys.go index 2432c4bd2ddc2..17dde03575513 100644 --- a/comp/logs/agent/config/config_keys.go +++ b/comp/logs/agent/config/config_keys.go @@ -9,8 +9,9 @@ import ( "encoding/json" "time" - coreConfig "github.com/DataDog/datadog-agent/pkg/config" - configUtils "github.com/DataDog/datadog-agent/pkg/config/utils" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" + pkgconfigutils "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/util/log" ) @@ -18,30 +19,30 @@ import ( type LogsConfigKeys struct { prefix string vectorPrefix string - config coreConfig.Reader + config pkgconfigmodel.Reader } // defaultLogsConfigKeys defines the default YAML keys used to retrieve logs configuration -func defaultLogsConfigKeys(config coreConfig.Reader) *LogsConfigKeys { +func defaultLogsConfigKeys(config pkgconfigmodel.Reader) *LogsConfigKeys { return NewLogsConfigKeys("logs_config.", config) } // defaultLogsConfigKeys defines the default YAML keys used to retrieve logs configuration -func defaultLogsConfigKeysWithVectorOverride(config coreConfig.Reader) *LogsConfigKeys { +func defaultLogsConfigKeysWithVectorOverride(config pkgconfigmodel.Reader) *LogsConfigKeys { return NewLogsConfigKeysWithVector("logs_config.", "logs.", config) } // NewLogsConfigKeys returns a new logs configuration keys set -func NewLogsConfigKeys(configPrefix string, config coreConfig.Reader) *LogsConfigKeys { +func NewLogsConfigKeys(configPrefix string, config pkgconfigmodel.Reader) *LogsConfigKeys { return &LogsConfigKeys{prefix: configPrefix, vectorPrefix: "", config: config} } // NewLogsConfigKeysWithVector returns a new logs configuration keys set with vector config keys enabled -func NewLogsConfigKeysWithVector(configPrefix, vectorPrefix string, config coreConfig.Reader) *LogsConfigKeys { +func NewLogsConfigKeysWithVector(configPrefix, vectorPrefix string, config pkgconfigmodel.Reader) *LogsConfigKeys { return &LogsConfigKeys{prefix: configPrefix, vectorPrefix: vectorPrefix, config: config} } -func (l *LogsConfigKeys) getConfig() coreConfig.Reader { +func (l *LogsConfigKeys) getConfig() pkgconfigmodel.Reader { return l.config } @@ -49,7 +50,7 @@ func (l *LogsConfigKeys) getConfigKey(key string) string { return l.prefix + key } -func isSetAndNotEmpty(config coreConfig.Reader, key string) bool { +func isSetAndNotEmpty(config pkgconfigmodel.Reader, key string) bool { return config.IsSet(key) && len(config.GetString(key)) > 0 } @@ -123,9 +124,9 @@ func (l *LogsConfigKeys) hasAdditionalEndpoints() bool { // getLogsAPIKey provides the dd api key used by the main logs agent sender. func (l *LogsConfigKeys) getLogsAPIKey() string { if configKey := l.getConfigKey("api_key"); l.isSetAndNotEmpty(configKey) { - return configUtils.SanitizeAPIKey(l.getConfig().GetString(configKey)) + return pkgconfigutils.SanitizeAPIKey(l.getConfig().GetString(configKey)) } - return configUtils.SanitizeAPIKey(l.getConfig().GetString("api_key")) + return pkgconfigutils.SanitizeAPIKey(l.getConfig().GetString("api_key")) } func (l *LogsConfigKeys) connectionResetInterval() time.Duration { @@ -166,8 +167,8 @@ func (l *LogsConfigKeys) batchWait() time.Duration { key := l.getConfigKey("batch_wait") batchWait := l.getConfig().GetInt(key) if batchWait < 1 || 10 < batchWait { - log.Warnf("Invalid %s: %v should be in [1, 10], fallback on %v", key, batchWait, coreConfig.DefaultBatchWait) - return coreConfig.DefaultBatchWait * time.Second + log.Warnf("Invalid %s: %v should be in [1, 10], fallback on %v", key, batchWait, pkgconfigsetup.DefaultBatchWait) + return pkgconfigsetup.DefaultBatchWait * time.Second } return (time.Duration(batchWait) * time.Second) } @@ -176,8 +177,8 @@ func (l *LogsConfigKeys) batchMaxConcurrentSend() int { key := l.getConfigKey("batch_max_concurrent_send") batchMaxConcurrentSend := l.getConfig().GetInt(key) if batchMaxConcurrentSend < 0 { - log.Warnf("Invalid %s: %v should be >= 0, fallback on %v", key, batchMaxConcurrentSend, coreConfig.DefaultBatchMaxConcurrentSend) - return coreConfig.DefaultBatchMaxConcurrentSend + log.Warnf("Invalid %s: %v should be >= 0, fallback on %v", key, batchMaxConcurrentSend, pkgconfigsetup.DefaultBatchMaxConcurrentSend) + return pkgconfigsetup.DefaultBatchMaxConcurrentSend } return batchMaxConcurrentSend } @@ -186,8 +187,8 @@ func (l *LogsConfigKeys) batchMaxSize() int { key := l.getConfigKey("batch_max_size") batchMaxSize := l.getConfig().GetInt(key) if batchMaxSize <= 0 { - log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, batchMaxSize, coreConfig.DefaultBatchMaxSize) - return coreConfig.DefaultBatchMaxSize + log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, batchMaxSize, pkgconfigsetup.DefaultBatchMaxSize) + return pkgconfigsetup.DefaultBatchMaxSize } return batchMaxSize } @@ -196,8 +197,8 @@ func (l *LogsConfigKeys) batchMaxContentSize() int { key := l.getConfigKey("batch_max_content_size") batchMaxContentSize := l.getConfig().GetInt(key) if batchMaxContentSize <= 0 { - log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, batchMaxContentSize, coreConfig.DefaultBatchMaxContentSize) - return coreConfig.DefaultBatchMaxContentSize + log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, batchMaxContentSize, pkgconfigsetup.DefaultBatchMaxContentSize) + return pkgconfigsetup.DefaultBatchMaxContentSize } return batchMaxContentSize } @@ -206,8 +207,8 @@ func (l *LogsConfigKeys) inputChanSize() int { key := l.getConfigKey("input_chan_size") inputChanSize := l.getConfig().GetInt(key) if inputChanSize <= 0 { - log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, inputChanSize, coreConfig.DefaultInputChanSize) - return coreConfig.DefaultInputChanSize + log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, inputChanSize, pkgconfigsetup.DefaultInputChanSize) + return pkgconfigsetup.DefaultInputChanSize } return inputChanSize } @@ -216,8 +217,8 @@ func (l *LogsConfigKeys) senderBackoffFactor() float64 { key := l.getConfigKey("sender_backoff_factor") senderBackoffFactor := l.getConfig().GetFloat64(key) if senderBackoffFactor < 2 { - log.Warnf("Invalid %s: %v should be >= 2, fallback on %v", key, senderBackoffFactor, coreConfig.DefaultLogsSenderBackoffFactor) - return coreConfig.DefaultLogsSenderBackoffFactor + log.Warnf("Invalid %s: %v should be >= 2, fallback on %v", key, senderBackoffFactor, pkgconfigsetup.DefaultLogsSenderBackoffFactor) + return pkgconfigsetup.DefaultLogsSenderBackoffFactor } return senderBackoffFactor } @@ -226,8 +227,8 @@ func (l *LogsConfigKeys) senderBackoffBase() float64 { key := l.getConfigKey("sender_backoff_base") senderBackoffBase := l.getConfig().GetFloat64(key) if senderBackoffBase <= 0 { - log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, senderBackoffBase, coreConfig.DefaultLogsSenderBackoffBase) - return coreConfig.DefaultLogsSenderBackoffBase + log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, senderBackoffBase, pkgconfigsetup.DefaultLogsSenderBackoffBase) + return pkgconfigsetup.DefaultLogsSenderBackoffBase } return senderBackoffBase } @@ -236,8 +237,8 @@ func (l *LogsConfigKeys) senderBackoffMax() float64 { key := l.getConfigKey("sender_backoff_max") senderBackoffMax := l.getConfig().GetFloat64(key) if senderBackoffMax <= 0 { - log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, senderBackoffMax, coreConfig.DefaultLogsSenderBackoffMax) - return coreConfig.DefaultLogsSenderBackoffMax + log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, senderBackoffMax, pkgconfigsetup.DefaultLogsSenderBackoffMax) + return pkgconfigsetup.DefaultLogsSenderBackoffMax } return senderBackoffMax } @@ -246,8 +247,8 @@ func (l *LogsConfigKeys) senderRecoveryInterval() int { key := l.getConfigKey("sender_recovery_interval") recoveryInterval := l.getConfig().GetInt(key) if recoveryInterval <= 0 { - log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, recoveryInterval, coreConfig.DefaultLogsSenderBackoffRecoveryInterval) - return coreConfig.DefaultLogsSenderBackoffRecoveryInterval + log.Warnf("Invalid %s: %v should be > 0, fallback on %v", key, recoveryInterval, pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval) + return pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval } return recoveryInterval } diff --git a/comp/logs/agent/config/config_test.go b/comp/logs/agent/config/config_test.go index ad7107df79aa4..9a5cab526189e 100644 --- a/comp/logs/agent/config/config_test.go +++ b/comp/logs/agent/config/config_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/DataDog/datadog-agent/comp/core/config" - coreConfig "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" "github.com/DataDog/datadog-agent/pkg/util/fxutil" "github.com/DataDog/datadog-agent/pkg/util/pointer" "github.com/stretchr/testify/suite" @@ -202,7 +202,7 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsEnvVar() { Version: EPIntakeVersion1, } - expectedEndpoints := NewEndpointsWithBatchSettings(expectedMainEndpoint, []Endpoint{expectedAdditionalEndpoint1, expectedAdditionalEndpoint2}, false, true, 1*time.Second, coreConfig.DefaultBatchMaxConcurrentSend, coreConfig.DefaultBatchMaxSize, coreConfig.DefaultBatchMaxContentSize, coreConfig.DefaultInputChanSize) + expectedEndpoints := NewEndpointsWithBatchSettings(expectedMainEndpoint, []Endpoint{expectedAdditionalEndpoint1, expectedAdditionalEndpoint2}, false, true, 1*time.Second, pkgconfigsetup.DefaultBatchMaxConcurrentSend, pkgconfigsetup.DefaultBatchMaxSize, pkgconfigsetup.DefaultBatchMaxContentSize, pkgconfigsetup.DefaultInputChanSize) endpoints, err := BuildHTTPEndpoints(suite.config, "test-track", "test-proto", "test-source") suite.Nil(err) @@ -277,10 +277,10 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsInConfig() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion1, } expectedAdditionalEndpoint1 := Endpoint{ @@ -290,10 +290,10 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsInConfig() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion1, } expectedAdditionalEndpoint2 := Endpoint{ @@ -303,14 +303,14 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsInConfig() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion1, } - expectedEndpoints := NewEndpointsWithBatchSettings(expectedMainEndpoint, []Endpoint{expectedAdditionalEndpoint1, expectedAdditionalEndpoint2}, false, true, 1*time.Second, coreConfig.DefaultBatchMaxConcurrentSend, coreConfig.DefaultBatchMaxSize, coreConfig.DefaultBatchMaxContentSize, coreConfig.DefaultInputChanSize) + expectedEndpoints := NewEndpointsWithBatchSettings(expectedMainEndpoint, []Endpoint{expectedAdditionalEndpoint1, expectedAdditionalEndpoint2}, false, true, 1*time.Second, pkgconfigsetup.DefaultBatchMaxConcurrentSend, pkgconfigsetup.DefaultBatchMaxSize, pkgconfigsetup.DefaultBatchMaxContentSize, pkgconfigsetup.DefaultInputChanSize) endpoints, err := BuildHTTPEndpoints(suite.config, "test-track", "test-proto", "test-source") suite.Nil(err) @@ -349,10 +349,10 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsInConfig2() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Protocol: "test-proto", @@ -365,10 +365,10 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsInConfig2() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion1, } expectedAdditionalEndpoint2 := Endpoint{ @@ -378,17 +378,17 @@ func (suite *ConfigTestSuite) TestMultipleHttpEndpointsInConfig2() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Protocol: "test-proto", Origin: "test-source", } - expectedEndpoints := NewEndpointsWithBatchSettings(expectedMainEndpoint, []Endpoint{expectedAdditionalEndpoint1, expectedAdditionalEndpoint2}, false, true, 1*time.Second, coreConfig.DefaultBatchMaxConcurrentSend, coreConfig.DefaultBatchMaxSize, coreConfig.DefaultBatchMaxContentSize, coreConfig.DefaultInputChanSize) + expectedEndpoints := NewEndpointsWithBatchSettings(expectedMainEndpoint, []Endpoint{expectedAdditionalEndpoint1, expectedAdditionalEndpoint2}, false, true, 1*time.Second, pkgconfigsetup.DefaultBatchMaxConcurrentSend, pkgconfigsetup.DefaultBatchMaxSize, pkgconfigsetup.DefaultBatchMaxContentSize, pkgconfigsetup.DefaultInputChanSize) endpoints, err := BuildHTTPEndpoints(suite.config, "test-track", "test-proto", "test-source") suite.Nil(err) @@ -452,10 +452,10 @@ func (suite *ConfigTestSuite) TestEndpointsSetLogsDDUrl() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Protocol: "test-proto", @@ -464,13 +464,13 @@ func (suite *ConfigTestSuite) TestEndpointsSetLogsDDUrl() { expectedEndpoints := &Endpoints{ UseHTTP: true, - BatchWait: coreConfig.DefaultBatchWait * time.Second, + BatchWait: pkgconfigsetup.DefaultBatchWait * time.Second, Main: main, Endpoints: []Endpoint{main}, - BatchMaxSize: coreConfig.DefaultBatchMaxSize, - BatchMaxContentSize: coreConfig.DefaultBatchMaxContentSize, - BatchMaxConcurrentSend: coreConfig.DefaultBatchMaxConcurrentSend, - InputChanSize: coreConfig.DefaultInputChanSize, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } suite.Nil(err) @@ -496,10 +496,10 @@ func (suite *ConfigTestSuite) TestEndpointsSetDDSite() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Origin: "test-source", @@ -511,10 +511,10 @@ func (suite *ConfigTestSuite) TestEndpointsSetDDSite() { BatchWait: 10 * time.Second, Main: main, Endpoints: []Endpoint{main}, - BatchMaxSize: coreConfig.DefaultBatchMaxSize, - BatchMaxContentSize: coreConfig.DefaultBatchMaxContentSize, - BatchMaxConcurrentSend: coreConfig.DefaultBatchMaxConcurrentSend, - InputChanSize: coreConfig.DefaultInputChanSize, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } suite.Nil(err) @@ -532,10 +532,10 @@ func (suite *ConfigTestSuite) TestBuildServerlessEndpoints() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Origin: "lambda-extension", @@ -547,10 +547,10 @@ func (suite *ConfigTestSuite) TestBuildServerlessEndpoints() { BatchWait: 1 * time.Second, Main: main, Endpoints: []Endpoint{main}, - BatchMaxSize: coreConfig.DefaultBatchMaxSize, - BatchMaxContentSize: coreConfig.DefaultBatchMaxContentSize, - BatchMaxConcurrentSend: coreConfig.DefaultBatchMaxConcurrentSend, - InputChanSize: coreConfig.DefaultInputChanSize, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } endpoints, err := BuildServerlessEndpoints(suite.config, "test-track", "test-proto") @@ -566,10 +566,10 @@ func getTestEndpoint(host string, port int, ssl bool) Endpoint { Port: port, UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Protocol: "test-proto", @@ -582,13 +582,13 @@ func getTestEndpoint(host string, port int, ssl bool) Endpoint { func getTestEndpoints(e Endpoint) *Endpoints { return &Endpoints{ UseHTTP: true, - BatchWait: coreConfig.DefaultBatchWait * time.Second, + BatchWait: pkgconfigsetup.DefaultBatchWait * time.Second, Main: e, Endpoints: []Endpoint{e}, - BatchMaxSize: coreConfig.DefaultBatchMaxSize, - BatchMaxContentSize: coreConfig.DefaultBatchMaxContentSize, - BatchMaxConcurrentSend: coreConfig.DefaultBatchMaxConcurrentSend, - InputChanSize: coreConfig.DefaultInputChanSize, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } } func (suite *ConfigTestSuite) TestBuildEndpointsWithVectorHttpOverride() { @@ -722,10 +722,10 @@ func (suite *ConfigTestSuite) TestEndpointsSetLogsDDUrlWithPrefix() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Protocol: "test-proto", @@ -734,13 +734,13 @@ func (suite *ConfigTestSuite) TestEndpointsSetLogsDDUrlWithPrefix() { expectedEndpoints := &Endpoints{ UseHTTP: true, - BatchWait: coreConfig.DefaultBatchWait * time.Second, + BatchWait: pkgconfigsetup.DefaultBatchWait * time.Second, Main: main, Endpoints: []Endpoint{main}, - BatchMaxSize: coreConfig.DefaultBatchMaxSize, - BatchMaxContentSize: coreConfig.DefaultBatchMaxContentSize, - BatchMaxConcurrentSend: coreConfig.DefaultBatchMaxConcurrentSend, - InputChanSize: coreConfig.DefaultInputChanSize, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } suite.Nil(err) @@ -763,10 +763,10 @@ func (suite *ConfigTestSuite) TestEndpointsSetDDUrlWithPrefix() { UseSSL: pointer.Ptr(true), UseCompression: true, CompressionLevel: 6, - BackoffFactor: coreConfig.DefaultLogsSenderBackoffFactor, - BackoffBase: coreConfig.DefaultLogsSenderBackoffBase, - BackoffMax: coreConfig.DefaultLogsSenderBackoffMax, - RecoveryInterval: coreConfig.DefaultLogsSenderBackoffRecoveryInterval, + BackoffFactor: pkgconfigsetup.DefaultLogsSenderBackoffFactor, + BackoffBase: pkgconfigsetup.DefaultLogsSenderBackoffBase, + BackoffMax: pkgconfigsetup.DefaultLogsSenderBackoffMax, + RecoveryInterval: pkgconfigsetup.DefaultLogsSenderBackoffRecoveryInterval, Version: EPIntakeVersion2, TrackType: "test-track", Protocol: "test-proto", @@ -775,13 +775,13 @@ func (suite *ConfigTestSuite) TestEndpointsSetDDUrlWithPrefix() { expectedEndpoints := &Endpoints{ UseHTTP: true, - BatchWait: coreConfig.DefaultBatchWait * time.Second, + BatchWait: pkgconfigsetup.DefaultBatchWait * time.Second, Main: main, Endpoints: []Endpoint{main}, - BatchMaxSize: coreConfig.DefaultBatchMaxSize, - BatchMaxContentSize: coreConfig.DefaultBatchMaxContentSize, - BatchMaxConcurrentSend: coreConfig.DefaultBatchMaxConcurrentSend, - InputChanSize: coreConfig.DefaultInputChanSize, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } suite.Nil(err) diff --git a/comp/logs/agent/config/endpoints.go b/comp/logs/agent/config/endpoints.go index cf12f9e394f21..1da2241a8fb84 100644 --- a/comp/logs/agent/config/endpoints.go +++ b/comp/logs/agent/config/endpoints.go @@ -9,7 +9,7 @@ import ( "fmt" "time" - "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" ) // EPIntakeVersion is the events platform intake API version @@ -135,11 +135,11 @@ func NewEndpoints(main Endpoint, additionalEndpoints []Endpoint, useProto bool, Endpoints: append([]Endpoint{main}, additionalEndpoints...), UseProto: useProto, UseHTTP: useHTTP, - BatchWait: config.DefaultBatchWait, - BatchMaxConcurrentSend: config.DefaultBatchMaxConcurrentSend, - BatchMaxSize: config.DefaultBatchMaxSize, - BatchMaxContentSize: config.DefaultBatchMaxContentSize, - InputChanSize: config.DefaultInputChanSize, + BatchWait: pkgconfigsetup.DefaultBatchWait, + BatchMaxConcurrentSend: pkgconfigsetup.DefaultBatchMaxConcurrentSend, + BatchMaxSize: pkgconfigsetup.DefaultBatchMaxSize, + BatchMaxContentSize: pkgconfigsetup.DefaultBatchMaxContentSize, + InputChanSize: pkgconfigsetup.DefaultInputChanSize, } } diff --git a/comp/logs/agent/config/endpoints_test.go b/comp/logs/agent/config/endpoints_test.go index dcd6f62e7fff7..e2481c58ec027 100644 --- a/comp/logs/agent/config/endpoints_test.go +++ b/comp/logs/agent/config/endpoints_test.go @@ -13,8 +13,8 @@ import ( "go.uber.org/fx" "github.com/DataDog/datadog-agent/comp/core/config" - coreConfig "github.com/DataDog/datadog-agent/pkg/config" - "github.com/DataDog/datadog-agent/pkg/config/utils" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" + pkgconfigutils "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/util/fxutil" ) @@ -30,35 +30,35 @@ func (suite *EndpointsTestSuite) SetupTest() { } func (suite *EndpointsTestSuite) TestLogsEndpointConfig() { - suite.Equal("agent-intake.logs.datadoghq.com", utils.GetMainEndpoint(coreConfig.Datadog, tcpEndpointPrefix, "logs_config.dd_url")) + suite.Equal("agent-intake.logs.datadoghq.com", pkgconfigutils.GetMainEndpoint(suite.config, tcpEndpointPrefix, "logs_config.dd_url")) endpoints, err := BuildEndpoints(suite.config, HTTPConnectivityFailure, "test-track", "test-proto", "test-source") suite.Nil(err) suite.Equal("agent-intake.logs.datadoghq.com", endpoints.Main.Host) suite.Equal(10516, endpoints.Main.Port) suite.config.SetWithoutSource("site", "datadoghq.com") - suite.Equal("agent-intake.logs.datadoghq.com", utils.GetMainEndpoint(coreConfig.Datadog, tcpEndpointPrefix, "logs_config.dd_url")) + suite.Equal("agent-intake.logs.datadoghq.com", pkgconfigutils.GetMainEndpoint(suite.config, tcpEndpointPrefix, "logs_config.dd_url")) endpoints, err = BuildEndpoints(suite.config, HTTPConnectivityFailure, "test-track", "test-proto", "test-source") suite.Nil(err) suite.Equal("agent-intake.logs.datadoghq.com", endpoints.Main.Host) suite.Equal(10516, endpoints.Main.Port) suite.config.SetWithoutSource("site", "datadoghq.eu") - suite.Equal("agent-intake.logs.datadoghq.eu", utils.GetMainEndpoint(coreConfig.Datadog, tcpEndpointPrefix, "logs_config.dd_url")) + suite.Equal("agent-intake.logs.datadoghq.eu", pkgconfigutils.GetMainEndpoint(suite.config, tcpEndpointPrefix, "logs_config.dd_url")) endpoints, err = BuildEndpoints(suite.config, HTTPConnectivityFailure, "test-track", "test-proto", "test-source") suite.Nil(err) suite.Equal("agent-intake.logs.datadoghq.eu", endpoints.Main.Host) suite.Equal(443, endpoints.Main.Port) suite.config.SetWithoutSource("logs_config.dd_url", "lambda.logs.datadoghq.co.jp") - suite.Equal("lambda.logs.datadoghq.co.jp", utils.GetMainEndpoint(coreConfig.Datadog, tcpEndpointPrefix, "logs_config.dd_url")) + suite.Equal("lambda.logs.datadoghq.co.jp", pkgconfigutils.GetMainEndpoint(suite.config, tcpEndpointPrefix, "logs_config.dd_url")) endpoints, err = BuildEndpoints(suite.config, HTTPConnectivityFailure, "test-track", "test-proto", "test-source") suite.Nil(err) suite.Equal("lambda.logs.datadoghq.co.jp", endpoints.Main.Host) suite.Equal(10516, endpoints.Main.Port) suite.config.SetWithoutSource("logs_config.logs_dd_url", "azure.logs.datadoghq.co.uk:1234") - suite.Equal("azure.logs.datadoghq.co.uk:1234", utils.GetMainEndpoint(coreConfig.Datadog, tcpEndpointPrefix, "logs_config.logs_dd_url")) + suite.Equal("azure.logs.datadoghq.co.uk:1234", pkgconfigutils.GetMainEndpoint(suite.config, tcpEndpointPrefix, "logs_config.logs_dd_url")) endpoints, err = BuildEndpoints(suite.config, HTTPConnectivityFailure, "test-track", "test-proto", "test-source") suite.Nil(err) suite.Equal("azure.logs.datadoghq.co.uk", endpoints.Main.Host) @@ -239,7 +239,7 @@ func (suite *EndpointsTestSuite) TestBuildEndpointsShouldFallbackOnDefaultWithIn suite.config.SetWithoutSource("logs_config.batch_wait", batchWait) endpoints, err := BuildEndpoints(suite.config, HTTPConnectivityFailure, "test-track", "test-proto", "test-source") suite.Nil(err) - suite.Equal(endpoints.BatchWait, coreConfig.DefaultBatchWait*time.Second) + suite.Equal(endpoints.BatchWait, pkgconfigsetup.DefaultBatchWait*time.Second) } } diff --git a/comp/logs/agent/config/go.mod b/comp/logs/agent/config/go.mod new file mode 100644 index 0000000000000..d6c44193d424d --- /dev/null +++ b/comp/logs/agent/config/go.mod @@ -0,0 +1,85 @@ +module github.com/DataDog/datadog-agent/comp/logs/agent/config + +go 1.21 + +replace ( + github.com/DataDog/datadog-agent/cmd/agent/common/path => ../../../../cmd/agent/common/path + github.com/DataDog/datadog-agent/comp/core/config => ../../../../comp/core/config + github.com/DataDog/datadog-agent/comp/core/flare/types => ../../../../comp/core/flare/types + github.com/DataDog/datadog-agent/comp/core/secrets => ../../../../comp/core/secrets + github.com/DataDog/datadog-agent/pkg/collector/check/defaults => ../../../../pkg/collector/check/defaults + github.com/DataDog/datadog-agent/pkg/config/env => ../../../../pkg/config/env/ + github.com/DataDog/datadog-agent/pkg/config/model => ../../../../pkg/config/model/ + github.com/DataDog/datadog-agent/pkg/config/setup => ../../../../pkg/config/setup + github.com/DataDog/datadog-agent/pkg/config/utils => ../../../../pkg/config/utils + github.com/DataDog/datadog-agent/pkg/telemetry => ../../../../pkg/telemetry + github.com/DataDog/datadog-agent/pkg/util/executable => ../../../../pkg/util/executable + github.com/DataDog/datadog-agent/pkg/util/filesystem => ../../../../pkg/util/filesystem + github.com/DataDog/datadog-agent/pkg/util/fxutil => ../../../../pkg/util/fxutil + github.com/DataDog/datadog-agent/pkg/util/hostname/validate => ../../../../pkg/util/hostname/validate + github.com/DataDog/datadog-agent/pkg/util/log => ../../../../pkg/util/log + github.com/DataDog/datadog-agent/pkg/util/optional => ../../../../pkg/util/optional + github.com/DataDog/datadog-agent/pkg/util/pointer => ../../../../pkg/util/pointer + github.com/DataDog/datadog-agent/pkg/util/scrubber => ../../../../pkg/util/scrubber + github.com/DataDog/datadog-agent/pkg/util/system/socket => ../../../../pkg/util/system/socket + github.com/DataDog/datadog-agent/pkg/util/winutil => ../../../../pkg/util/winutil + github.com/DataDog/datadog-agent/pkg/version => ../../../../pkg/version +) + +require ( + github.com/DataDog/datadog-agent/comp/core/config v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/config/model v0.50.0-rc.4 + github.com/DataDog/datadog-agent/pkg/config/setup v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/config/utils v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/util/fxutil v0.50.0-rc.4 + github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.4 + github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.0-rc.4 + github.com/DataDog/viper v1.12.0 + github.com/stretchr/testify v1.8.4 + go.uber.org/fx v1.18.2 +) + +require ( + github.com/DataDog/datadog-agent/comp/core/secrets v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/config/env v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/executable v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.50.0-rc.4 // indirect + github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/optional v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.4 // indirect + github.com/DataDog/datadog-agent/pkg/util/system/socket v0.50.0-rc.4 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/version v0.50.1 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v3 v3.23.9 // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/dig v1.17.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.23.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.6.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/comp/logs/agent/config/go.sum b/comp/logs/agent/config/go.sum new file mode 100644 index 0000000000000..7868b80aa23d2 --- /dev/null +++ b/comp/logs/agent/config/go.sum @@ -0,0 +1,353 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/datadog-agent/comp/core/telemetry v0.50.0-rc.4 h1:otuQe2x+WAgN78POmUSlOq0MRJkoLRlyGR5Fn3H55fI= +github.com/DataDog/datadog-agent/comp/core/telemetry v0.50.0-rc.4/go.mod h1:fqxtze7NiJ+jQnLCT/F38ewDy8yVGraReiJNZRtQNVM= +github.com/DataDog/viper v1.12.0 h1:FufyZpZPxyszafSV5B8Q8it75IhhuJwH0T7QpT6HnD0= +github.com/DataDog/viper v1.12.0/go.mod h1:wDdUVJ2SHaMaPrCZrlRCObwkubsX8j5sme3LaR/SGTc= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 h1:S4qyfL2sEm5Budr4KVMyEniCy+PbS55651I/a+Kn/NQ= +github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E= +github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/prometheus v0.42.0 h1:jwV9iQdvp38fxXi8ZC+lNpxjK16MRcZlpDYvbuO1FiA= +go.opentelemetry.io/otel/exporters/prometheus v0.42.0/go.mod h1:f3bYiqNqhoPxkvI2LrXqQVC546K7BuRDL/kKuxkujhA= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= +go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= +go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= +go.uber.org/fx v1.18.2 h1:bUNI6oShr+OVFQeU8cDNbnN7VFsu+SsjHzUF51V/GAU= +go.uber.org/fx v1.18.2/go.mod h1:g0V1KMQ66zIRk8bLu3Ea5Jt2w/cHlOIp4wdRsgh0JaY= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/comp/logs/agent/config/integration_config.go b/comp/logs/agent/config/integration_config.go index 52192fee3f01f..83d7667896311 100644 --- a/comp/logs/agent/config/integration_config.go +++ b/comp/logs/agent/config/integration_config.go @@ -11,7 +11,7 @@ import ( "strings" "sync" - pkgConfig "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" ) // Logs source types @@ -278,7 +278,7 @@ func (c *LogsConfig) validateTailingMode() error { // AutoMultiLineEnabled determines whether auto multi line detection is enabled for this config, // considering both the agent-wide logs_config.auto_multi_line_detection and any config for this // particular log source. -func (c *LogsConfig) AutoMultiLineEnabled(coreConfig pkgConfig.Reader) bool { +func (c *LogsConfig) AutoMultiLineEnabled(coreConfig pkgconfigmodel.Reader) bool { if c.AutoMultiLine != nil { return *c.AutoMultiLine } diff --git a/go.mod b/go.mod index fb190eee1fd58..7d747f28e17aa 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,7 @@ replace ( github.com/DataDog/datadog-agent/comp/core/log => ./comp/core/log/ github.com/DataDog/datadog-agent/comp/core/secrets => ./comp/core/secrets github.com/DataDog/datadog-agent/comp/core/telemetry => ./comp/core/telemetry/ + github.com/DataDog/datadog-agent/comp/logs/agent/config => ./comp/logs/agent/config github.com/DataDog/datadog-agent/pkg/aggregator/ckey => ./pkg/aggregator/ckey/ github.com/DataDog/datadog-agent/pkg/collector/check/defaults => ./pkg/collector/check/defaults github.com/DataDog/datadog-agent/pkg/config/env => ./pkg/config/env @@ -37,6 +38,7 @@ replace ( github.com/DataDog/datadog-agent/pkg/config/model => ./pkg/config/model/ github.com/DataDog/datadog-agent/pkg/config/remote => ./pkg/config/remote/ github.com/DataDog/datadog-agent/pkg/config/setup => ./pkg/config/setup/ + github.com/DataDog/datadog-agent/pkg/config/utils => ./pkg/config/utils/ github.com/DataDog/datadog-agent/pkg/errors => ./pkg/errors github.com/DataDog/datadog-agent/pkg/gohai => ./pkg/gohai github.com/DataDog/datadog-agent/pkg/metrics => ./pkg/metrics/ @@ -597,6 +599,7 @@ require ( github.com/DataDog/datadog-agent/comp/core/log v0.0.0-00010101000000-000000000000 github.com/DataDog/datadog-agent/comp/core/secrets v0.0.0-00010101000000-000000000000 github.com/DataDog/datadog-agent/comp/core/telemetry v0.50.0-rc.4 + github.com/DataDog/datadog-agent/comp/logs/agent/config v0.0.0-00010101000000-000000000000 github.com/DataDog/datadog-agent/pkg/aggregator/ckey v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/config/env v0.50.0-rc.4 @@ -604,6 +607,7 @@ require ( github.com/DataDog/datadog-agent/pkg/config/model v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/config/remote v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/config/setup v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/config/utils v0.0.0-00010101000000-000000000000 github.com/DataDog/datadog-agent/pkg/errors v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/metrics v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/networkdevice/profile v0.50.0-rc.4 @@ -629,7 +633,7 @@ require ( github.com/DataDog/datadog-agent/pkg/util/statstracker v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/util/testutil v0.50.0-rc.4 github.com/DataDog/datadog-agent/pkg/util/winutil v0.0.0-00010101000000-000000000000 - github.com/DataDog/datadog-agent/pkg/version v0.50.0-rc.4 + github.com/DataDog/datadog-agent/pkg/version v0.50.1 github.com/DataDog/go-libddwaf/v2 v2.2.2 github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.9.0 github.com/aquasecurity/trivy v0.0.0-00010101000000-000000000000 diff --git a/pkg/aggregator/demultiplexer_agent.go b/pkg/aggregator/demultiplexer_agent.go index 0c6a78c2ae7ed..3ab455ef21067 100644 --- a/pkg/aggregator/demultiplexer_agent.go +++ b/pkg/aggregator/demultiplexer_agent.go @@ -162,7 +162,7 @@ func initAgentDemultiplexer(log log.Component, sharedForwarder forwarder.Forward // --------------- bufferSize := config.Datadog.GetInt("aggregator_buffer_size") - metricSamplePool := metrics.NewMetricSamplePool(MetricSamplePoolBatchSize, utils.IsTelemetryEnabled()) + metricSamplePool := metrics.NewMetricSamplePool(MetricSamplePoolBatchSize, utils.IsTelemetryEnabled(config.Datadog)) _, statsdPipelinesCount := GetDogStatsDWorkerAndPipelineCount() log.Debug("the Demultiplexer will use", statsdPipelinesCount, "pipelines") diff --git a/pkg/aggregator/demultiplexer_serverless.go b/pkg/aggregator/demultiplexer_serverless.go index 10f2e3cb780c2..6016531c95e03 100644 --- a/pkg/aggregator/demultiplexer_serverless.go +++ b/pkg/aggregator/demultiplexer_serverless.go @@ -43,7 +43,7 @@ func InitAndStartServerlessDemultiplexer(keysPerDomain map[string][]string, forw log := logimpl.NewTemporaryLoggerWithoutInit() forwarder := forwarder.NewSyncForwarder(config.Datadog, log, keysPerDomain, forwarderTimeout) serializer := serializer.NewSerializer(forwarder, nil) - metricSamplePool := metrics.NewMetricSamplePool(MetricSamplePoolBatchSize, utils.IsTelemetryEnabled()) + metricSamplePool := metrics.NewMetricSamplePool(MetricSamplePoolBatchSize, utils.IsTelemetryEnabled(config.Datadog)) tagsStore := tags.NewStore(config.Datadog.GetBool("aggregator_use_tags_store"), "timesampler") statsdSampler := NewTimeSampler(TimeSamplerID(0), bucketSize, tagsStore, "") diff --git a/pkg/collector/check/stats/stats.go b/pkg/collector/check/stats/stats.go index b87fb7af981dd..8522416f3f040 100644 --- a/pkg/collector/check/stats/stats.go +++ b/pkg/collector/check/stats/stats.go @@ -13,6 +13,7 @@ import ( "github.com/mitchellh/mapstructure" checkid "github.com/DataDog/datadog-agent/pkg/collector/check/id" + "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/telemetry" "github.com/DataDog/datadog-agent/pkg/util/log" @@ -136,14 +137,14 @@ func NewStats(c StatsCheck) *Stats { CheckVersion: c.Version(), CheckConfigSource: c.ConfigSource(), Interval: c.Interval(), - telemetry: utils.IsCheckTelemetryEnabled(c.String()), + telemetry: utils.IsCheckTelemetryEnabled(c.String(), config.Datadog), EventPlatformEvents: make(map[string]int64), TotalEventPlatformEvents: make(map[string]int64), } // We are interested in a check's run state values even when they are 0 so we // initialize them here explicitly - if stats.telemetry && utils.IsTelemetryEnabled() { + if stats.telemetry && utils.IsTelemetryEnabled(config.Datadog) { tlmRuns.InitializeToZero(stats.CheckName, runCheckFailureTag) tlmRuns.InitializeToZero(stats.CheckName, runCheckSuccessTag) } diff --git a/pkg/collector/corechecks/checkbase.go b/pkg/collector/corechecks/checkbase.go index 76cc71a10d6e9..468940af50467 100644 --- a/pkg/collector/corechecks/checkbase.go +++ b/pkg/collector/corechecks/checkbase.go @@ -17,6 +17,7 @@ import ( "github.com/DataDog/datadog-agent/pkg/collector/check/defaults" checkid "github.com/DataDog/datadog-agent/pkg/collector/check/id" "github.com/DataDog/datadog-agent/pkg/collector/check/stats" + "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/diagnose/diagnosis" "github.com/DataDog/datadog-agent/pkg/util/log" @@ -63,7 +64,7 @@ func NewCheckBaseWithInterval(name string, defaultInterval time.Duration) CheckB checkName: name, checkID: checkid.ID(name), checkInterval: defaultInterval, - telemetry: utils.IsCheckTelemetryEnabled(name), + telemetry: utils.IsCheckTelemetryEnabled(name, config.Datadog), } } diff --git a/pkg/collector/corechecks/embed/apm.go b/pkg/collector/corechecks/embed/apm.go index 3d3c7b8a9f211..a85ae2e358d18 100644 --- a/pkg/collector/corechecks/embed/apm.go +++ b/pkg/collector/corechecks/embed/apm.go @@ -182,7 +182,7 @@ func (c *APMCheck) Configure(senderManager sender.SenderManager, integrationConf } c.source = source - c.telemetry = utils.IsCheckTelemetryEnabled("apm") + c.telemetry = utils.IsCheckTelemetryEnabled("apm", config.Datadog) c.initConfig = string(initConfig) c.instanceConfig = string(data) return nil diff --git a/pkg/collector/corechecks/embed/jmx/check.go b/pkg/collector/corechecks/embed/jmx/check.go index 3af5e8afe0068..7b8b5064073ac 100644 --- a/pkg/collector/corechecks/embed/jmx/check.go +++ b/pkg/collector/corechecks/embed/jmx/check.go @@ -16,6 +16,7 @@ import ( "github.com/DataDog/datadog-agent/pkg/autodiscovery/integration" checkid "github.com/DataDog/datadog-agent/pkg/collector/check/id" "github.com/DataDog/datadog-agent/pkg/collector/check/stats" + pkgConfig "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/diagnose/diagnosis" "github.com/DataDog/datadog-agent/pkg/util/log" @@ -41,7 +42,7 @@ func newJMXCheck(senderManager sender.SenderManager, config integration.Config, name: config.Name, id: checkid.ID(fmt.Sprintf("%v_%x", config.Name, digest)), source: source, - telemetry: utils.IsCheckTelemetryEnabled("jmx"), + telemetry: utils.IsCheckTelemetryEnabled("jmx", pkgConfig.Datadog), } check.Configure(senderManager, digest, config.InitConfig, config.MetricConfig, source) //nolint:errcheck diff --git a/pkg/collector/corechecks/embed/process_agent.go b/pkg/collector/corechecks/embed/process_agent.go index 849a0191fe69b..9a6c253ddf34f 100644 --- a/pkg/collector/corechecks/embed/process_agent.go +++ b/pkg/collector/corechecks/embed/process_agent.go @@ -185,7 +185,7 @@ func (c *ProcessAgentCheck) Configure(senderManager sender.SenderManager, integr } c.source = source - c.telemetry = utils.IsCheckTelemetryEnabled("process_agent") + c.telemetry = utils.IsCheckTelemetryEnabled("process_agent", config.Datadog) c.initConfig = string(initConfig) c.instanceConfig = string(data) return nil diff --git a/pkg/collector/python/check.go b/pkg/collector/python/check.go index 2bcf970085608..c00e4a887385e 100644 --- a/pkg/collector/python/check.go +++ b/pkg/collector/python/check.go @@ -79,7 +79,7 @@ func NewPythonCheck(senderManager sender.SenderManager, name string, class *C.rt class: class, interval: defaults.DefaultCheckInterval, lastWarnings: []error{}, - telemetry: utils.IsCheckTelemetryEnabled(name), + telemetry: utils.IsCheckTelemetryEnabled(name, config.Datadog), } runtime.SetFinalizer(pyCheck, pythonCheckFinalizer) diff --git a/pkg/config/utils/endpoints.go b/pkg/config/utils/endpoints.go index e7efd56e5b054..5cb71950dd9f6 100644 --- a/pkg/config/utils/endpoints.go +++ b/pkg/config/utils/endpoints.go @@ -11,7 +11,8 @@ import ( "regexp" "strings" - "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" "github.com/DataDog/datadog-agent/pkg/util/log" "github.com/DataDog/datadog-agent/pkg/version" ) @@ -20,7 +21,7 @@ const ( infraURLPrefix = "https://app." ) -func getResolvedDDUrl(c config.Reader, urlKey string) string { +func getResolvedDDUrl(c pkgconfigmodel.Reader, urlKey string) string { resolvedDDURL := c.GetString(urlKey) if c.IsSet("site") { log.Infof("'site' and '%s' are both set in config: setting main endpoint to '%s': \"%s\"", urlKey, urlKey, c.GetString(urlKey)) @@ -68,7 +69,7 @@ func mergeAdditionalEndpoints(keysPerDomain, additionalEndpoints map[string][]st } // GetMainEndpointBackwardCompatible implements the logic to extract the DD URL from a config, based on `site`,ddURLKey and a backward compatible key -func GetMainEndpointBackwardCompatible(c config.Reader, prefix string, ddURLKey string, backwardKey string) string { +func GetMainEndpointBackwardCompatible(c pkgconfigmodel.Reader, prefix string, ddURLKey string, backwardKey string) string { if c.IsSet(ddURLKey) && c.GetString(ddURLKey) != "" { // value under ddURLKey takes precedence over backwardKey and 'site' return getResolvedDDUrl(c, ddURLKey) @@ -78,11 +79,11 @@ func GetMainEndpointBackwardCompatible(c config.Reader, prefix string, ddURLKey } else if c.GetString("site") != "" { return prefix + strings.TrimSpace(c.GetString("site")) } - return prefix + config.DefaultSite + return prefix + pkgconfigsetup.DefaultSite } // GetMultipleEndpoints returns the api keys per domain specified in the main agent config -func GetMultipleEndpoints(c config.Reader) (map[string][]string, error) { +func GetMultipleEndpoints(c pkgconfigmodel.Reader) (map[string][]string, error) { ddURL := GetInfraEndpoint(c) // Validating domain if _, err := url.Parse(ddURL); err != nil { @@ -100,18 +101,18 @@ func GetMultipleEndpoints(c config.Reader) (map[string][]string, error) { } // GetMainEndpoint returns the main DD URL defined in the config, based on `site` and the prefix, or ddURLKey -func GetMainEndpoint(c config.Reader, prefix string, ddURLKey string) string { +func GetMainEndpoint(c pkgconfigmodel.Reader, prefix string, ddURLKey string) string { // value under ddURLKey takes precedence over 'site' if c.IsSet(ddURLKey) && c.GetString(ddURLKey) != "" { return getResolvedDDUrl(c, ddURLKey) } else if c.GetString("site") != "" { return prefix + strings.TrimSpace(c.GetString("site")) } - return prefix + config.DefaultSite + return prefix + pkgconfigsetup.DefaultSite } // GetInfraEndpoint returns the main DD Infra URL defined in config, based on the value of `site` and `dd_url` -func GetInfraEndpoint(c config.Reader) string { +func GetInfraEndpoint(c pkgconfigmodel.Reader) string { return GetMainEndpoint(c, infraURLPrefix, "dd_url") } diff --git a/pkg/config/utils/endpoints_test.go b/pkg/config/utils/endpoints_test.go index 0860a94c4465a..c75a062adc71c 100644 --- a/pkg/config/utils/endpoints_test.go +++ b/pkg/config/utils/endpoints_test.go @@ -6,10 +6,10 @@ package utils import ( + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" "testing" "github.com/DataDog/datadog-agent/comp/core/secrets" - "github.com/DataDog/datadog-agent/pkg/config" "github.com/DataDog/datadog-agent/pkg/util/optional" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -20,10 +20,10 @@ import ( // endpoints are configured. // Refer to https://github.com/DataDog/viper/pull/2 for more details. func TestSecretBackendWithMultipleEndpoints(t *testing.T) { - conf := config.SetupConf() + conf := pkgconfigsetup.Conf() conf.SetConfigFile("./tests/datadog_secrets.yaml") // load the configuration - _, err := config.LoadDatadogCustom(conf, "datadog_secrets.yaml", optional.NewNoneOption[secrets.Component](), nil) + _, err := pkgconfigsetup.LoadDatadogCustom(conf, "datadog_secrets.yaml", optional.NewNoneOption[secrets.Component](), nil) assert.NoError(t, err) expectedKeysPerDomain := map[string][]string{ @@ -46,7 +46,7 @@ additional_endpoints: - someapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -78,7 +78,7 @@ additional_endpoints: - someapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -101,7 +101,7 @@ func TestGetMultipleEndpointsEnvVar(t *testing.T) { t.Setenv("DD_API_KEY", "fakeapikey") t.Setenv("DD_ADDITIONAL_ENDPOINTS", "{\"https://foo.datadoghq.com\": [\"someapikey\"]}") - testConfig := config.SetupConf() + testConfig := pkgconfigsetup.Conf() multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -131,7 +131,7 @@ additional_endpoints: - someapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -158,7 +158,7 @@ dd_url: "https://app.datadoghq.com" api_key: fakeapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -186,7 +186,7 @@ additional_endpoints: - "" ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -219,7 +219,7 @@ additional_endpoints: - someapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -241,7 +241,7 @@ additional_endpoints: func TestSiteEnvVar(t *testing.T) { t.Setenv("DD_API_KEY", "fakeapikey") t.Setenv("DD_SITE", "datadoghq.eu") - testConfig := config.SetupConfFromYAML("") + testConfig := pkgconfigsetup.ConfFromYAML("") multipleEndpoints, err := GetMultipleEndpoints(testConfig) externalAgentURL := GetMainEndpoint(testConfig, "https://external-agent.", "external_config.external_agent_dd_url") @@ -261,7 +261,7 @@ func TestDefaultSite(t *testing.T) { datadogYaml := ` api_key: fakeapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) externalAgentURL := GetMainEndpoint(testConfig, "https://external-agent.", "external_config.external_agent_dd_url") @@ -282,7 +282,7 @@ func TestSite(t *testing.T) { site: datadoghq.eu api_key: fakeapikey ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) externalAgentURL := GetMainEndpoint(testConfig, "https://external-agent.", "external_config.external_agent_dd_url") @@ -302,7 +302,7 @@ func TestDDURLEnvVar(t *testing.T) { t.Setenv("DD_API_KEY", "fakeapikey") t.Setenv("DD_URL", "https://app.datadoghq.eu") t.Setenv("DD_EXTERNAL_CONFIG_EXTERNAL_AGENT_DD_URL", "https://custom.external-agent.datadoghq.com") - testConfig := config.SetupConfFromYAML("") + testConfig := pkgconfigsetup.ConfFromYAML("") testConfig.BindEnv("external_config.external_agent_dd_url") multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -323,7 +323,7 @@ func TestDDDDURLEnvVar(t *testing.T) { t.Setenv("DD_API_KEY", "fakeapikey") t.Setenv("DD_DD_URL", "https://app.datadoghq.eu") t.Setenv("DD_EXTERNAL_CONFIG_EXTERNAL_AGENT_DD_URL", "https://custom.external-agent.datadoghq.com") - testConfig := config.SetupConfFromYAML("") + testConfig := pkgconfigsetup.ConfFromYAML("") testConfig.BindEnv("external_config.external_agent_dd_url") multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -348,7 +348,7 @@ func TestDDURLAndDDDDURLEnvVar(t *testing.T) { t.Setenv("DD_URL", "https://app.datadoghq.dd_url.eu") t.Setenv("DD_EXTERNAL_CONFIG_EXTERNAL_AGENT_DD_URL", "https://custom.external-agent.datadoghq.com") - testConfig := config.SetupConfFromYAML("") + testConfig := pkgconfigsetup.ConfFromYAML("") testConfig.BindEnv("external_config.external_agent_dd_url") multipleEndpoints, err := GetMultipleEndpoints(testConfig) @@ -374,7 +374,7 @@ api_key: fakeapikey external_config: external_agent_dd_url: "https://external-agent.datadoghq.com" ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) externalAgentURL := GetMainEndpoint(testConfig, "https://external-agent.", "external_config.external_agent_dd_url") @@ -398,7 +398,7 @@ api_key: fakeapikey external_config: external_agent_dd_url: "https://custom.external-agent.datadoghq.eu" ` - testConfig := config.SetupConfFromYAML(datadogYaml) + testConfig := pkgconfigsetup.ConfFromYAML(datadogYaml) multipleEndpoints, err := GetMultipleEndpoints(testConfig) externalAgentURL := GetMainEndpoint(testConfig, "https://external-agent.", "external_config.external_agent_dd_url") diff --git a/pkg/config/utils/go.mod b/pkg/config/utils/go.mod new file mode 100644 index 0000000000000..1dae72dcbb1f8 --- /dev/null +++ b/pkg/config/utils/go.mod @@ -0,0 +1,72 @@ +module github.com/DataDog/datadog-agent/pkg/config/utils + +go 1.21 + +replace ( + github.com/DataDog/datadog-agent/comp/core/flare/types => ../../../comp/core/flare/types + github.com/DataDog/datadog-agent/comp/core/secrets => ../../../comp/core/secrets + github.com/DataDog/datadog-agent/comp/core/telemetry => ../../../comp/core/telemetry + github.com/DataDog/datadog-agent/pkg/collector/check/defaults => ../../collector/check/defaults + github.com/DataDog/datadog-agent/pkg/config/env => ../env + github.com/DataDog/datadog-agent/pkg/config/model => ../model/ + github.com/DataDog/datadog-agent/pkg/config/setup => ../setup/ + github.com/DataDog/datadog-agent/pkg/telemetry => ../../telemetry + github.com/DataDog/datadog-agent/pkg/util/executable => ../../util/executable + github.com/DataDog/datadog-agent/pkg/util/filesystem => ../../util/filesystem + github.com/DataDog/datadog-agent/pkg/util/fxutil => ../../util/fxutil + github.com/DataDog/datadog-agent/pkg/util/hostname/validate => ../../util/hostname/validate + github.com/DataDog/datadog-agent/pkg/util/log => ../../util/log + github.com/DataDog/datadog-agent/pkg/util/optional => ../../util/optional + github.com/DataDog/datadog-agent/pkg/util/scrubber => ../../util/scrubber + github.com/DataDog/datadog-agent/pkg/util/system/socket => ../../util/system/socket + github.com/DataDog/datadog-agent/pkg/util/winutil => ../../util/winutil + github.com/DataDog/datadog-agent/pkg/version => ../../version +) + +require ( + github.com/DataDog/datadog-agent/comp/core/secrets v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/config/model v0.50.0-rc.4 + github.com/DataDog/datadog-agent/pkg/config/setup v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/util/log v0.50.0-rc.4 + github.com/DataDog/datadog-agent/pkg/util/optional v0.0.0-00010101000000-000000000000 + github.com/DataDog/datadog-agent/pkg/version v0.50.1 + github.com/stretchr/testify v1.8.4 +) + +require ( + github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/config/env v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/executable v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.50.0-rc.4 // indirect + github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.0-rc.4 // indirect + github.com/DataDog/datadog-agent/pkg/util/system/socket v0.50.0-rc.4 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.0.0-00010101000000-000000000000 // indirect + github.com/DataDog/viper v1.12.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 // indirect + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v3 v3.23.9 // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.uber.org/atomic v1.11.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.6.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/pkg/config/utils/go.sum b/pkg/config/utils/go.sum new file mode 100644 index 0000000000000..264fe2319c5b1 --- /dev/null +++ b/pkg/config/utils/go.sum @@ -0,0 +1,343 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/viper v1.12.0 h1:FufyZpZPxyszafSV5B8Q8it75IhhuJwH0T7QpT6HnD0= +github.com/DataDog/viper v1.12.0/go.mod h1:wDdUVJ2SHaMaPrCZrlRCObwkubsX8j5sme3LaR/SGTc= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 h1:S4qyfL2sEm5Budr4KVMyEniCy+PbS55651I/a+Kn/NQ= +github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E= +github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/prometheus v0.42.0 h1:jwV9iQdvp38fxXi8ZC+lNpxjK16MRcZlpDYvbuO1FiA= +go.opentelemetry.io/otel/exporters/prometheus v0.42.0/go.mod h1:f3bYiqNqhoPxkvI2LrXqQVC546K7BuRDL/kKuxkujhA= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= +go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= +go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= +go.uber.org/fx v1.18.2 h1:bUNI6oShr+OVFQeU8cDNbnN7VFsu+SsjHzUF51V/GAU= +go.uber.org/fx v1.18.2/go.mod h1:g0V1KMQ66zIRk8bLu3Ea5Jt2w/cHlOIp4wdRsgh0JaY= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/pkg/config/utils/metadata_providers.go b/pkg/config/utils/metadata_providers.go index 18b820a575d9e..ca2d3b01e46a8 100644 --- a/pkg/config/utils/metadata_providers.go +++ b/pkg/config/utils/metadata_providers.go @@ -8,7 +8,7 @@ package utils import ( "time" - "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" ) // MetadataProviders helps unmarshalling `metadata_providers` config param @@ -18,7 +18,7 @@ type MetadataProviders struct { } // GetMetadataProviders returns the "metadata_providers" set in the configuration -func GetMetadataProviders(c config.Reader) ([]MetadataProviders, error) { +func GetMetadataProviders(c pkgconfigmodel.Reader) ([]MetadataProviders, error) { var mp []MetadataProviders return mp, c.UnmarshalKey("metadata_providers", &mp) } diff --git a/pkg/config/utils/miscellaneous.go b/pkg/config/utils/miscellaneous.go index a31df1b8404d7..f1ff435c0a752 100644 --- a/pkg/config/utils/miscellaneous.go +++ b/pkg/config/utils/miscellaneous.go @@ -9,11 +9,11 @@ package utils import ( "path/filepath" - "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" ) // ConfFileDirectory returns the absolute path to the folder containing the config // file used to populate the registry -func ConfFileDirectory(c config.Reader) string { +func ConfFileDirectory(c pkgconfigmodel.Reader) string { return filepath.Dir(c.ConfigFileUsed()) } diff --git a/pkg/config/utils/tags.go b/pkg/config/utils/tags.go index 50dbd38e546a8..5a5d3afa16199 100644 --- a/pkg/config/utils/tags.go +++ b/pkg/config/utils/tags.go @@ -5,12 +5,14 @@ package utils -import "github.com/DataDog/datadog-agent/pkg/config" +import ( + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" +) // GetConfiguredTags returns list of tags from a configuration, based on // `tags` (DD_TAGS) and `extra_tags“ (DD_EXTRA_TAGS), with `dogstatsd_tags` (DD_DOGSTATSD_TAGS) // if includeDogdstatsd is true. -func GetConfiguredTags(c config.Reader, includeDogstatsd bool) []string { +func GetConfiguredTags(c pkgconfigmodel.Reader, includeDogstatsd bool) []string { tags := c.GetStringSlice("tags") extraTags := c.GetStringSlice("extra_tags") diff --git a/pkg/config/utils/tags_test.go b/pkg/config/utils/tags_test.go index c5e22b346f1f7..081cf771e676d 100644 --- a/pkg/config/utils/tags_test.go +++ b/pkg/config/utils/tags_test.go @@ -6,14 +6,17 @@ package utils import ( + "strings" "testing" - "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" "github.com/stretchr/testify/assert" ) func TestGetConfiguredaTags(t *testing.T) { - mockConfig := config.Mock(t) + mockConfig := pkgconfigmodel.NewConfig("test", "DD", strings.NewReplacer(".", "_")) + pkgconfigsetup.InitConfig(mockConfig) set1 := []string{"1", "2", "3"} @@ -22,7 +25,8 @@ func TestGetConfiguredaTags(t *testing.T) { } func TestGetConfiguredaTagsExtraTags(t *testing.T) { - mockConfig := config.Mock(t) + mockConfig := pkgconfigmodel.NewConfig("test", "DD", strings.NewReplacer(".", "_")) + pkgconfigsetup.InitConfig(mockConfig) set1 := []string{"1", "2", "3"} @@ -31,7 +35,8 @@ func TestGetConfiguredaTagsExtraTags(t *testing.T) { } func TestGetConfiguredaTagsDSD(t *testing.T) { - mockConfig := config.Mock(t) + mockConfig := pkgconfigmodel.NewConfig("test", "DD", strings.NewReplacer(".", "_")) + pkgconfigsetup.InitConfig(mockConfig) set1 := []string{"1", "2", "3"} @@ -41,7 +46,8 @@ func TestGetConfiguredaTagsDSD(t *testing.T) { } func TestGetConfiguredaTagsCombined(t *testing.T) { - mockConfig := config.Mock(t) + mockConfig := pkgconfigmodel.NewConfig("test", "DD", strings.NewReplacer(".", "_")) + pkgconfigsetup.InitConfig(mockConfig) set1 := []string{"1", "2", "3"} set2 := []string{"4", "5", "6"} diff --git a/pkg/config/utils/telemetry.go b/pkg/config/utils/telemetry.go index 295962a25482b..87a81ff90e0cb 100644 --- a/pkg/config/utils/telemetry.go +++ b/pkg/config/utils/telemetry.go @@ -5,19 +5,21 @@ package utils -import "github.com/DataDog/datadog-agent/pkg/config" +import ( + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" +) // IsCheckTelemetryEnabled returns if we want telemetry for the given check. // Returns true if a * is present in the telemetry.checks list. -func IsCheckTelemetryEnabled(checkName string) bool { +func IsCheckTelemetryEnabled(checkName string, cfg pkgconfigmodel.Reader) bool { // false if telemetry is disabled - if !IsTelemetryEnabled() { + if !IsTelemetryEnabled(cfg) { return false } // by default, we don't enable telemetry for every checks stats - if config.Datadog.IsSet("telemetry.checks") { - for _, check := range config.Datadog.GetStringSlice("telemetry.checks") { + if cfg.IsSet("telemetry.checks") { + for _, check := range cfg.GetStringSlice("telemetry.checks") { if check == "*" { return true } else if check == checkName { @@ -29,6 +31,6 @@ func IsCheckTelemetryEnabled(checkName string) bool { } // IsTelemetryEnabled returns whether or not telemetry is enabled -func IsTelemetryEnabled() bool { - return config.Datadog.IsSet("telemetry.enabled") && config.Datadog.GetBool("telemetry.enabled") +func IsTelemetryEnabled(cfg pkgconfigmodel.Reader) bool { + return cfg.IsSet("telemetry.enabled") && cfg.GetBool("telemetry.enabled") } diff --git a/pkg/config/utils/telemetry_test.go b/pkg/config/utils/telemetry_test.go index 7fbab67e361ab..5a02771ab804d 100644 --- a/pkg/config/utils/telemetry_test.go +++ b/pkg/config/utils/telemetry_test.go @@ -6,48 +6,50 @@ package utils import ( + "strings" "testing" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" "github.com/stretchr/testify/assert" - - "github.com/DataDog/datadog-agent/pkg/config" ) func TestIsCheckTelemetryEnabled(t *testing.T) { assert := assert.New(t) - mockConfig := config.Mock(t) + mockConfig := pkgconfigmodel.NewConfig("test", "DD", strings.NewReplacer(".", "_")) + pkgconfigsetup.InitConfig(mockConfig) mockConfig.SetWithoutSource("telemetry.enabled", false) - assert.False(IsCheckTelemetryEnabled("cpu")) - assert.False(IsCheckTelemetryEnabled("disk")) + assert.False(IsCheckTelemetryEnabled("cpu", mockConfig)) + assert.False(IsCheckTelemetryEnabled("disk", mockConfig)) mockConfig.SetWithoutSource("telemetry.enabled", true) - assert.False(IsCheckTelemetryEnabled("cpu")) - assert.False(IsCheckTelemetryEnabled("disk")) + assert.False(IsCheckTelemetryEnabled("cpu", mockConfig)) + assert.False(IsCheckTelemetryEnabled("disk", mockConfig)) mockConfig.SetWithoutSource("telemetry.enabled", true) mockConfig.SetWithoutSource("telemetry.checks", []string{"*"}) - assert.True(IsCheckTelemetryEnabled("cpu")) - assert.True(IsCheckTelemetryEnabled("disk")) + assert.True(IsCheckTelemetryEnabled("cpu", mockConfig)) + assert.True(IsCheckTelemetryEnabled("disk", mockConfig)) mockConfig.SetWithoutSource("telemetry.enabled", true) mockConfig.SetWithoutSource("telemetry.checks", []string{"cpu"}) - assert.True(IsCheckTelemetryEnabled("cpu")) - assert.False(IsCheckTelemetryEnabled("disk")) + assert.True(IsCheckTelemetryEnabled("cpu", mockConfig)) + assert.False(IsCheckTelemetryEnabled("disk", mockConfig)) mockConfig.SetWithoutSource("telemetry.enabled", false) mockConfig.SetWithoutSource("telemetry.checks", []string{"cpu"}) - assert.False(IsCheckTelemetryEnabled("cpu")) - assert.False(IsCheckTelemetryEnabled("disk")) + assert.False(IsCheckTelemetryEnabled("cpu", mockConfig)) + assert.False(IsCheckTelemetryEnabled("disk", mockConfig)) mockConfig.SetWithoutSource("telemetry.enabled", true) mockConfig.SetWithoutSource("telemetry.checks", []string{"cpu", "disk"}) - assert.True(IsCheckTelemetryEnabled("cpu")) - assert.True(IsCheckTelemetryEnabled("disk")) + assert.True(IsCheckTelemetryEnabled("cpu", mockConfig)) + assert.True(IsCheckTelemetryEnabled("disk", mockConfig)) } diff --git a/pkg/config/utils/trace.go b/pkg/config/utils/trace.go index b085211f71ae4..a1103bf505b3f 100644 --- a/pkg/config/utils/trace.go +++ b/pkg/config/utils/trace.go @@ -8,12 +8,12 @@ package utils import ( "strings" - "github.com/DataDog/datadog-agent/pkg/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" "github.com/DataDog/datadog-agent/pkg/util/log" ) // GetTraceAgentDefaultEnv returns the default env for the trace agent -func GetTraceAgentDefaultEnv(c config.Reader) string { +func GetTraceAgentDefaultEnv(c pkgconfigmodel.Reader) string { defaultEnv := "" if c.IsSet("apm_config.env") { defaultEnv = c.GetString("apm_config.env") diff --git a/tasks/modules.py b/tasks/modules.py index 75addee22445f..b4760a8d3ac59 100644 --- a/tasks/modules.py +++ b/tasks/modules.py @@ -168,10 +168,12 @@ def dependency_path(self, agent_version): "comp/core/log": GoModule("comp/core/log", independent=True), "comp/core/secrets": GoModule("comp/core/secrets", independent=True), "comp/core/telemetry": GoModule("comp/core/telemetry", independent=True), + "comp/logs/agent/config": GoModule("comp/logs/agent/config", independent=True), "cmd/agent/common/path": GoModule("cmd/agent/common/path", independent=True), "pkg/config/model": GoModule("pkg/config/model", independent=True), "pkg/config/env": GoModule("pkg/config/env", independent=True), "pkg/config/setup": GoModule("pkg/config/setup", independent=True), + "pkg/config/utils": GoModule("pkg/config/utils", independent=True), "pkg/config/logs": GoModule("pkg/config/logs", independent=True), "pkg/config/remote": GoModule("pkg/config/remote", independent=True), "pkg/security/secl": GoModule("pkg/security/secl", independent=True),