Documentation ¶
Index ¶
- Constants
- Variables
- func AddAgentVersionToDomain(DDURL string, app string) (string, error)
- func AddOverride(name string, value interface{})
- func AddOverrideFunc(f func(Config))
- func AddOverrides(vars map[string]interface{})
- func ChangeLogLevel(level string) error
- func EnvVarAreSetAndNotEqual(lhsName string, rhsName string) bool
- func FileUsedDir() string
- func GenerateLoggerInterface(logConfig *seelogCfg.Config) (seelog.LoggerInterface, error)
- func GetBindHost() string
- func GetBindHostFromConfig(cfg ConfigReader) string
- func GetConfiguredTags(config Config, includeDogstatsd bool) []string
- func GetEnvDefault(key, def string) string
- func GetGlobalConfiguredTags(includeDogstatsd bool) []string
- func GetIPCAddress() (string, error)
- func GetObsPipelineURL(datatype DataType) (string, error)
- func GetProcessAPIAddressPort() (string, error)
- func GetSyslogURI() string
- func GetSyslogURIFromConfig(cfg Config) string
- func GetTraceAgentDefaultEnv() string
- func GetValidHostAliases(_ context.Context) ([]string, error)
- func InitConfig(config Config)
- func InitSystemProbeConfig(cfg Config)
- func IsAnyContainerFeaturePresent() bool
- func IsAutoconfigEnabled() bool
- func IsCLCRunner() bool
- func IsCloudProviderEnabled(cloudProviderName string) bool
- func IsContainerized() bool
- func IsDockerRuntime() bool
- func IsECS() bool
- func IsECSFargate() bool
- func IsFeaturePresent(feature Feature) bool
- func IsHostProcAvailable() bool
- func IsHostSysAvailable() bool
- func IsKubernetes() bool
- func IsRemoteConfigEnabled(cfg ConfigReader) bool
- func IsServerless() bool
- func LoadProxyFromEnv(config Config)
- func Merge(configPaths []string) error
- func NewLogWriter(additionalDepth int, logLevel seelog.LogLevel) (io.Writer, error)
- func PrometheusScrapeChecksTransformer(in string) interface{}
- func ResolveSecrets(config Config, origin string) error
- func SanitizeAPIKey(key string) string
- func SanitizeAPIKeyConfig(config Config, key string)
- func SetupDogstatsdLogger(logFile string) (seelog.LoggerInterface, error)
- func SetupJMXLogger(logFile, syslogURI string, syslogRFC, logToConsole, jsonFormat bool) error
- func SetupLogger(loggerName LoggerName, logLevel, logFile, syslogURI string, ...) error
- func SetupOTLP(config Config)
- type ChangeChecker
- type Config
- type ConfigLoader
- type ConfigReader
- type ConfigReaderWriter
- type ConfigWriter
- type ConfigurationProviders
- type DataType
- type Endpoint
- type Feature
- type FeatureMap
- type LegacyConfigConverter
- type Listeners
- type LoggerName
- type MappingProfile
- type MetadataProviders
- type MetricMapping
- type MockConfig
- type Proxy
- type SyslogReceiver
- type UnexpectedUnicodeCodepoint
- type Warnings
- func Load() (*Warnings, error)
- func LoadCustom(config Config, origin string, loadSecret bool, additionalKnownEnvVars []string) (*Warnings, error)
- func LoadDatadogCustom(config Config, origin string, loadSecret bool, additionalKnownEnvVars []string) (*Warnings, error)
- func LoadWithoutSecret() (*Warnings, error)
Constants ¶
const ( // DefaultSite is the default site the Agent sends data to. DefaultSite = "datadoghq.com" // DefaultNumWorkers default number of workers for our check runner DefaultNumWorkers = 4 // MaxNumWorkers maximum number of workers for our check runner MaxNumWorkers = 25 // DefaultAPIKeyValidationInterval is the default interval of api key validation checks DefaultAPIKeyValidationInterval = 60 // DefaultForwarderRecoveryInterval is the default recovery interval, // also used if the user-provided value is invalid. DefaultForwarderRecoveryInterval = 2 // DefaultBatchWait is the default HTTP batch wait in second for logs DefaultBatchWait = 5 // DefaultBatchMaxConcurrentSend is the default HTTP batch max concurrent send for logs DefaultBatchMaxConcurrentSend = 0 // DefaultBatchMaxSize is the default HTTP batch max size (maximum number of events in a single batch) for logs DefaultBatchMaxSize = 1000 // DefaultInputChanSize is the default input chan size for events DefaultInputChanSize = 100 // DefaultBatchMaxContentSize is the default HTTP batch max content size (before compression) for logs // It is also the maximum possible size of a single event. Events exceeding this limit are dropped. DefaultBatchMaxContentSize = 5000000 // DefaultAuditorTTL is the default logs auditor TTL in hours DefaultAuditorTTL = 23 // ClusterIDCacheKey is the key name for the orchestrator cluster id in the agent in-mem cache ClusterIDCacheKey = "orchestratorClusterID" // DefaultRuntimePoliciesDir is the default policies directory used by the runtime security module DefaultRuntimePoliciesDir = "/etc/datadog-agent/runtime-security.d" // DefaultLogsSenderBackoffFactor is the default logs sender backoff randomness factor DefaultLogsSenderBackoffFactor = 2.0 // DefaultLogsSenderBackoffBase is the default logs sender base backoff time, seconds DefaultLogsSenderBackoffBase = 1.0 // DefaultLogsSenderBackoffMax is the default logs sender maximum backoff time, seconds DefaultLogsSenderBackoffMax = 120.0 // DefaultLogsSenderBackoffRecoveryInterval is the default logs sender backoff recovery interval DefaultLogsSenderBackoffRecoveryInterval = 2 // DefaultInventoriesMinInterval is the default value for inventories_min_interval, in seconds DefaultInventoriesMinInterval = 5 * 60 // DefaultInventoriesMaxInterval is the default value for inventories_max_interval, in seconds DefaultInventoriesMaxInterval = 10 * 60 )
const ( // DefaultSecurityAgentLogFile points to the log file that will be used by the security-agent if not configured DefaultSecurityAgentLogFile = "/var/log/datadog/security-agent.log" // DefaultProcessAgentLogFile is the default process-agent log file DefaultProcessAgentLogFile = "/var/log/datadog/process-agent.log" // DefaultDDAgentBin the process agent's binary DefaultDDAgentBin = "/opt/datadog-agent/bin/agent/agent" )
const ( OTLPSection = "otlp_config" OTLPTracesSubSectionKey = "traces" OTLPTracePort = OTLPSection + "." + OTLPTracesSubSectionKey + ".internal_port" OTLPTracesEnabled = OTLPSection + "." + OTLPTracesSubSectionKey + ".enabled" OTLPReceiverSubSectionKey = "receiver" OTLPReceiverSection = OTLPSection + "." + OTLPReceiverSubSectionKey OTLPMetricsSubSectionKey = "metrics" OTLPMetrics = OTLPSection + "." + OTLPMetricsSubSectionKey OTLPMetricsEnabled = OTLPSection + "." + OTLPMetricsSubSectionKey + ".enabled" OTLPTagCardinalityKey = OTLPMetrics + ".tag_cardinality" OTLPDebugKey = "debug" OTLPDebug = OTLPSection + "." + OTLPDebugKey )
OTLP configuration paths.
const ( // DefaultGRPCConnectionTimeoutSecs sets the default value for timeout when connecting to the agent DefaultGRPCConnectionTimeoutSecs = 60 // DefaultProcessQueueSize is the default max amount of process-agent checks that can be buffered in memory if the forwarder can't consume them fast enough (e.g. due to network disruption) // This can be fairly high as the input should get throttled by queue bytes first. // Assuming we generate ~8 checks/minute (for process/network), this should allow buffering of ~30 minutes of data assuming it fits within the queue bytes memory budget DefaultProcessQueueSize = 256 // DefaultProcessRTQueueSize is the default max amount of process-agent realtime checks that can be buffered in memory // We set a small queue size for real-time message because they get staled very quickly, thus we only keep the latest several payloads DefaultProcessRTQueueSize = 5 // DefaultProcessQueueBytes is the default amount of process-agent check data (in bytes) that can be buffered in memory // Allow buffering up to 60 megabytes of payload data in total DefaultProcessQueueBytes = 60 * 1000 * 1000 // DefaultProcessMaxPerMessage is the default maximum number of processes, or containers per message. Note: Only change if the defaults are causing issues. DefaultProcessMaxPerMessage = 100 // ProcessMaxPerMessageLimit is the maximum allowed value for maximum number of processes, or containers per message. ProcessMaxPerMessageLimit = 10000 // DefaultProcessMaxMessageBytes is the default max for size of a message containing processes or container data. Note: Only change if the defaults are causing issues. DefaultProcessMaxMessageBytes = 1000000 // ProcessMaxMessageBytesLimit is the maximum allowed value for the maximum size of a message containing processes or container data. ProcessMaxMessageBytesLimit = 4000000 // DefaultProcessExpVarPort is the default port used by the process-agent expvar server DefaultProcessExpVarPort = 6062 // DefaultProcessCmdPort is the default port used by process-agent to run a runtime settings server DefaultProcessCmdPort = 6162 // DefaultProcessEntityStreamPort is the default port used by the process-agent to expose Process Entities DefaultProcessEntityStreamPort = 6262 // DefaultProcessEndpoint is the default endpoint for the process agent to send payloads to DefaultProcessEndpoint = "https://process.datadoghq.com" // DefaultProcessEventsEndpoint is the default endpoint for the process agent to send event payloads to DefaultProcessEventsEndpoint = "https://process-events.datadoghq.com" // DefaultProcessEventStoreMaxItems is the default maximum amount of events that can be stored in the Event Store DefaultProcessEventStoreMaxItems = 200 // DefaultProcessEventStoreMaxPendingPushes is the default amount of pending push operations can be handled by the Event Store DefaultProcessEventStoreMaxPendingPushes = 10 // DefaultProcessEventStoreMaxPendingPulls is the default amount of pending pull operations can be handled by the Event Store DefaultProcessEventStoreMaxPendingPulls = 10 // DefaultProcessEventStoreStatsInterval is the default frequency at which the event store sends stats about expired events, in seconds DefaultProcessEventStoreStatsInterval = 20 // DefaultProcessEventsMinCheckInterval is the minimum interval allowed for the process_events check DefaultProcessEventsMinCheckInterval = time.Second // DefaultProcessEventsCheckInterval is the default interval used by the process_events check DefaultProcessEventsCheckInterval = 10 * time.Second // DefaultProcessDiscoveryHintFrequency is the default frequency in terms of number of checks which we send a process discovery hint DefaultProcessDiscoveryHintFrequency = 60 )
Variables ¶
var ( DefaultPython string // ForceDefaultPython has its value set to true at compile time if we should ignore // the Python version set in the configuration and use `DefaultPython` instead. // We use this to force Python 3 in the Agent 7 as it's the only one available. ForceDefaultPython string )
Variables to initialize at build time
var ( // StartTime is the agent startup time StartTime = time.Now() // DefaultSecurityProfilesDir is the default directory used to store Security Profiles by the runtime security module DefaultSecurityProfilesDir = filepath.Join(defaultRunPath, "runtime-security", "profiles") )
Variables to initialize at start time
var StandardJMXIntegrations = map[string]struct{}{
"activemq": {},
"activemq_58": {},
"cassandra": {},
"jmx": {},
"presto": {},
"solr": {},
"tomcat": {},
"kafka": {},
}
StandardJMXIntegrations is the list of standard jmx integrations. This list is used by the Agent to determine if an integration is JMXFetch-based, based only on the integration name. DEPRECATED: this list is only used for backward compatibility with older JMXFetch integration configs. All JMXFetch integrations should instead define `is_jmx: true` at the init_config or instance level.
var StandardStatsdPrefixes = []string{
"datadog.agent",
"datadog.dogstatsd",
"datadog.process",
"datadog.trace_agent",
"datadog.tracer",
"activemq",
"activemq_58",
"airflow",
"cassandra",
"confluent",
"hazelcast",
"hive",
"ignite",
"jboss",
"jvm",
"kafka",
"presto",
"sidekiq",
"solr",
"tomcat",
"runtime",
}
StandardStatsdPrefixes is a list of the statsd prefixes used by the agent and its components
Functions ¶
func AddAgentVersionToDomain ¶
AddAgentVersionToDomain prefixes the domain with the agent version: X-Y-Z.domain
func AddOverride ¶ added in v0.9.0
func AddOverride(name string, value interface{})
AddOverride provides an externally accessible method for overriding config variables. This method must be called before Load() to be effective.
func AddOverrideFunc ¶ added in v0.9.0
func AddOverrideFunc(f func(Config))
AddOverrideFunc allows to add a custom logic to override configuration. This method must be called before Load() to be effective.
func AddOverrides ¶
func AddOverrides(vars map[string]interface{})
AddOverrides provides an externally accessible method for overriding config variables. This method must be called before Load() to be effective.
func ChangeLogLevel ¶
ChangeLogLevel immediately changes the log level to the given one.
func EnvVarAreSetAndNotEqual ¶
EnvVarAreSetAndNotEqual returns true if two given variables are set in environment and are not equal.
func FileUsedDir ¶
func FileUsedDir() string
FileUsedDir returns the absolute path to the folder containing the config file used to populate the registry
func GenerateLoggerInterface ¶ added in v0.9.0
func GenerateLoggerInterface(logConfig *seelogCfg.Config) (seelog.LoggerInterface, error)
GenerateLoggerInterface return a logger Interface from a log config
func GetBindHost ¶ added in v0.9.0
func GetBindHost() string
GetBindHost returns `bind_host` variable or default value Not using `config.BindEnvAndSetDefault` as some processes need to know if value was default one or not (e.g. trace-agent)
func GetBindHostFromConfig ¶
func GetBindHostFromConfig(cfg ConfigReader) string
func GetConfiguredTags ¶ added in v0.9.0
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 GetEnvDefault ¶ added in v0.9.0
GetEnvDefault retrieves a value from the environment named by the key or return def if not set.
func GetGlobalConfiguredTags ¶
GetGlobalConfiguredTags returns complete list of user configured tags.
This is composed of DD_TAGS and DD_EXTRA_TAGS, with DD_DOGSTATSD_TAGS included if includeDogstatsd is true.
func GetIPCAddress ¶
GetIPCAddress returns the IPC address or an error if the address is not local
func GetObsPipelineURL ¶
GetObsPipelineURL returns the URL under the 'observability_pipelines_worker.' prefix for the given datatype
func GetProcessAPIAddressPort ¶
GetProcessAPIAddressPort returns the API endpoint of the process agent
func GetSyslogURI ¶
func GetSyslogURI() string
GetSyslogURI returns the configured/default syslog uri. Returns an empty string when syslog is disabled.
func GetSyslogURIFromConfig ¶
GetSyslogURIFromConfig is like GetSyslogURI but reads from the provided config
func GetTraceAgentDefaultEnv ¶
func GetTraceAgentDefaultEnv() string
GetTraceAgentDefaultEnv returns the default env for the trace agent
func GetValidHostAliases ¶ added in v0.9.0
GetValidHostAliases validates host aliases set in `host_aliases` variable and returns only valid ones.
func InitConfig ¶
func InitConfig(config Config)
InitConfig initializes the config defaults on a config
func InitSystemProbeConfig ¶ added in v0.9.0
func InitSystemProbeConfig(cfg Config)
InitSystemProbeConfig declares all the configuration values normally read from system-probe.yaml.
func IsAnyContainerFeaturePresent ¶
func IsAnyContainerFeaturePresent() bool
IsAnyContainerFeaturePresent checks if any of known container features is present
func IsAutoconfigEnabled ¶ added in v0.9.0
func IsAutoconfigEnabled() bool
IsAutoconfigEnabled returns if autoconfig from environment is activated or not
func IsCLCRunner ¶ added in v0.9.0
func IsCLCRunner() bool
IsCLCRunner returns whether the Agent is in cluster check runner mode
func IsCloudProviderEnabled ¶
IsCloudProviderEnabled checks the cloud provider family provided in pkg/util/<cloud_provider>.go against the value for cloud_provider: on the global config object Datadog
func IsContainerized ¶
func IsContainerized() bool
IsContainerized returns whether the Agent is running on a Docker container DOCKER_DD_AGENT is set in our official Dockerfile
func IsDockerRuntime ¶ added in v0.9.0
func IsDockerRuntime() bool
IsDockerRuntime returns true if we are to find the /.dockerenv file which is typically only set by Docker
func IsECSFargate ¶ added in v0.9.0
func IsECSFargate() bool
IsECSFargate returns whether the Agent is running in ECS Fargate
func IsFeaturePresent ¶ added in v0.9.0
IsFeaturePresent returns if a particular feature is activated
func IsHostProcAvailable ¶
func IsHostProcAvailable() bool
IsHostProcAvailable returns whether host proc is available or not
func IsHostSysAvailable ¶
func IsHostSysAvailable() bool
IsHostSysAvailable returns whether host proc is available or not
func IsKubernetes ¶
func IsKubernetes() bool
IsKubernetes returns whether the Agent is running on a kubernetes cluster
func IsRemoteConfigEnabled ¶
func IsRemoteConfigEnabled(cfg ConfigReader) bool
IsRemoteConfigEnabled returns true if Remote Configuration should be enabled
func IsServerless ¶
func IsServerless() bool
IsServerless returns whether the Agent is running in a Lambda function
func LoadProxyFromEnv ¶
func LoadProxyFromEnv(config Config)
LoadProxyFromEnv overrides the proxy settings with environment variables
func NewLogWriter ¶
NewLogWriter returns a logWriter set with given logLevel. Returns an error if logLevel is unknown/not set.
func PrometheusScrapeChecksTransformer ¶
func PrometheusScrapeChecksTransformer(in string) interface{}
PrometheusScrapeChecksTransformer unmarshals a prometheus check.
func ResolveSecrets ¶
ResolveSecrets merges all the secret values from origin into config. Secret values are identified by a value of the form "ENC[key]" where key is the secret key. See: https://github.com/DataDog/datadog-agent/blob/main/docs/agent/secrets.md
func SanitizeAPIKey ¶
SanitizeAPIKey strips newlines and other control characters from a given string.
func SanitizeAPIKeyConfig ¶
SanitizeAPIKeyConfig strips newlines and other control characters from a given key.
func SetupDogstatsdLogger ¶
func SetupDogstatsdLogger(logFile string) (seelog.LoggerInterface, error)
SetupDogstatsdLogger sets up a logger with dogstatsd logger name and log level if a non empty logFile is provided, it will also log to the file
func SetupJMXLogger ¶ added in v0.9.0
SetupJMXLogger sets up a logger with JMX logger name and log level if a non empty logFile is provided, it will also log to the file a non empty syslogURI will enable syslog, and format them following RFC 5424 if specified you can also specify to log to the console and in JSON format
func SetupLogger ¶
func SetupLogger(loggerName LoggerName, logLevel, logFile, syslogURI string, syslogRFC, logToConsole, jsonFormat bool) error
SetupLogger sets up a logger with the specified logger name and log level if a non empty logFile is provided, it will also log to the file a non empty syslogURI will enable syslog, and format them following RFC 5424 if specified you can also specify to log to the console and in JSON format
Types ¶
type ChangeChecker ¶
type ChangeChecker struct {
// contains filtered or unexported fields
}
ChangeChecker checks the state of `config.Datadog` did not change between `NewChangeChecker()“ and `HasChanged()`. It is designed to be used in `TestMain` function as follow:
func TestMain(m *testing.M) { checker := testutil.NewConfigChangeChecker() exit := m.Run() if checker.HasChanged() { os.Exit(1) } os.Exit(exit) }
func NewChangeChecker ¶
func NewChangeChecker() *ChangeChecker
NewChangeChecker creates a new instance of ConfigChangeChecker
func (*ChangeChecker) HasChanged ¶
func (c *ChangeChecker) HasChanged() bool
HasChanged returns whether `config.Datadog` changed since `NewConfigChangeChecker`. If some changes are detected this function displays on the standard error what keys changed.
type Config ¶
type Config interface { ConfigReaderWriter ConfigLoader }
Config represents an object that can load and store configuration parameters coming from different kind of sources: - defaults - files - environment variables - flags
type ConfigLoader ¶
type ConfigLoader interface { SetDefault(key string, value interface{}) SetFs(fs afero.Fs) SetEnvPrefix(in string) BindEnv(input ...string) SetEnvKeyReplacer(r *strings.Replacer) SetEnvKeyTransformer(key string, fn func(string) interface{}) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error Unmarshal(rawVal interface{}) error UnmarshalExact(rawVal interface{}) error ReadInConfig() error ReadConfig(in io.Reader) error MergeConfig(in io.Reader) error MergeConfigOverride(in io.Reader) error AddConfigPath(in string) SetConfigName(in string) SetConfigFile(in string) SetConfigType(in string) BindPFlag(key string, flag *pflag.Flag) error // SetKnown adds a key to the set of known valid config keys SetKnown(key string) // BindEnvAndSetDefault sets the default value for a config parameter and adds an env binding // in one call, used for most config options. // // If env is provided, it will override the name of the environment variable used for this // config key BindEnvAndSetDefault(key string, val interface{}, env ...string) }
type ConfigReader ¶
type ConfigReader interface { Get(key string) interface{} GetString(key string) string GetBool(key string) bool GetInt(key string) int GetInt32(key string) int32 GetInt64(key string) int64 GetFloat64(key string) float64 GetTime(key string) time.Time GetDuration(key string) time.Duration GetStringSlice(key string) []string GetFloat64SliceE(key string) ([]float64, error) GetStringMap(key string) map[string]interface{} GetStringMapString(key string) map[string]string GetStringMapStringSlice(key string) map[string][]string GetSizeInBytes(key string) uint GetProxies() *Proxy ConfigFileUsed() string AllSettings() map[string]interface{} AllSettingsWithoutDefault() map[string]interface{} AllKeys() []string IsSet(key string) bool // IsKnown returns whether this key is known IsKnown(key string) bool // GetKnownKeys returns all the keys that meet at least one of these criteria: // 1) have a default, 2) have an environment variable binded, 3) are an alias or 4) have been SetKnown() GetKnownKeys() map[string]interface{} // GetEnvVars returns a list of the env vars that the config supports. // These have had the EnvPrefix applied, as well as the EnvKeyReplacer. GetEnvVars() []string // IsSectionSet checks if a given section is set by checking if any of // its subkeys is set. IsSectionSet(section string) bool Warnings() *Warnings }
ConfigReader is a subset of Config that only allows reading of configuration
type ConfigReaderWriter ¶
type ConfigReaderWriter interface { ConfigReader ConfigWriter }
type ConfigWriter ¶
type ConfigurationProviders ¶
type ConfigurationProviders struct { Name string `mapstructure:"name"` Polling bool `mapstructure:"polling"` PollInterval string `mapstructure:"poll_interval"` TemplateURL string `mapstructure:"template_url"` TemplateDir string `mapstructure:"template_dir"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` CAFile string `mapstructure:"ca_file"` CAPath string `mapstructure:"ca_path"` CertFile string `mapstructure:"cert_file"` KeyFile string `mapstructure:"key_file"` Token string `mapstructure:"token"` GraceTimeSeconds int `mapstructure:"grace_time_seconds"` DegradedDeadlineMinutes int `mapstructure:"degraded_deadline_minutes"` }
ConfigurationProviders helps unmarshalling `config_providers` config param
type DataType ¶
type DataType string
DataType represent the generic data type (e.g. metrics, logs) that can be sent by the Agent
const Traces DataType = "traces"
Traces specifies the data type used for Vector override. See https://vector.dev/docs/reference/configuration/sources/datadog_agent/ for additional details.
type Endpoint ¶
type Endpoint struct { Site string `mapstructure:"site" json:"site"` URL string `mapstructure:"url" json:"url"` APIKey string `mapstructure:"api_key" json:"api_key"` APPKey string `mapstructure:"app_key" json:"app_key" ` }
Endpoint represent a datadog endpoint
type Feature ¶ added in v0.9.0
type Feature string
Feature represents a feature of current environment
const ( // Docker socket present Docker Feature = "docker" // Containerd socket present Containerd Feature = "containerd" // Cri is any cri socket present Cri Feature = "cri" // Kubernetes environment Kubernetes Feature = "kubernetes" // ECSEC2 environment ECSEC2 Feature = "ecsec2" // ECSFargate environment ECSFargate Feature = "ecsfargate" // EKSFargate environment EKSFargate Feature = "eksfargate" // KubeOrchestratorExplorer can be enabled KubeOrchestratorExplorer Feature = "orchestratorexplorer" // CloudFoundry socket present CloudFoundry Feature = "cloudfoundry" // Podman containers storage path accessible Podman Feature = "podman" )
Remember to also register feature in init()
type FeatureMap ¶ added in v0.9.0
type FeatureMap map[Feature]struct{}
FeatureMap represents all detected features
func GetDetectedFeatures ¶ added in v0.9.0
func GetDetectedFeatures() FeatureMap
GetDetectedFeatures returns all detected features (detection only performed once)
func (FeatureMap) String ¶ added in v0.9.0
func (fm FeatureMap) String() string
type LegacyConfigConverter ¶
type LegacyConfigConverter struct {
Config
}
LegacyConfigConverter is used in the legacy package to convert A5 config to A6
func NewConfigConverter ¶
func NewConfigConverter() *LegacyConfigConverter
NewConfigConverter is creating and returning a config converter
func (*LegacyConfigConverter) Set ¶
func (c *LegacyConfigConverter) Set(key string, value interface{})
Set is used for setting configuration from A5 config
type Listeners ¶
Listeners helps unmarshalling `listeners` config param
func (*Listeners) IsProviderEnabled ¶
IsProviderEnabled returns whether a config provider is enabled
func (*Listeners) SetEnabledProviders ¶
SetEnabledProviders registers the enabled config providers in the listener config
type LoggerName ¶
type LoggerName string
LoggerName specifies the name of an instantiated logger.
const ( CoreLoggerName LoggerName = "CORE" JMXLoggerName LoggerName = "JMXFETCH" DogstatsDLoggerName LoggerName = "DOGSTATSD" )
Constant values for LoggerName.
type MappingProfile ¶
type MappingProfile struct { Name string `mapstructure:"name" json:"name"` Prefix string `mapstructure:"prefix" json:"prefix"` Mappings []MetricMapping `mapstructure:"mappings" json:"mappings"` }
MappingProfile represent a group of mappings
func GetDogstatsdMappingProfiles ¶
func GetDogstatsdMappingProfiles() ([]MappingProfile, error)
GetDogstatsdMappingProfiles returns mapping profiles used in DogStatsD mapper
type MetadataProviders ¶
type MetadataProviders struct { Name string `mapstructure:"name"` Interval time.Duration `mapstructure:"interval"` }
MetadataProviders helps unmarshalling `metadata_providers` config param
type MetricMapping ¶
type MetricMapping struct { Match string `mapstructure:"match" json:"match"` MatchType string `mapstructure:"match_type" json:"match_type"` Name string `mapstructure:"name" json:"name"` Tags map[string]string `mapstructure:"tags" json:"tags"` }
MetricMapping represent one mapping rule
type MockConfig ¶
type MockConfig struct {
Config
}
MockConfig should only be used in tests
func MockSystemProbe ¶
func MockSystemProbe(t *testing.T) *MockConfig
MockSystemProbe is creating and returning a mock system-probe config
func (*MockConfig) Set ¶
func (c *MockConfig) Set(key string, value interface{})
Set is used for setting configuration in tests
type Proxy ¶
type Proxy struct { HTTP string `mapstructure:"http"` HTTPS string `mapstructure:"https"` NoProxy []string `mapstructure:"no_proxy"` }
Proxy represents the configuration for proxies in the agent
type SyslogReceiver ¶
type SyslogReceiver struct {
// contains filtered or unexported fields
}
SyslogReceiver implements seelog.CustomReceiver
func (*SyslogReceiver) AfterParse ¶
func (s *SyslogReceiver) AfterParse(initArgs seelog.CustomReceiverInitArgs) error
AfterParse parses the receiver configuration
func (*SyslogReceiver) Close ¶
func (s *SyslogReceiver) Close() error
Close is a NOP in current implementation
func (*SyslogReceiver) Flush ¶
func (s *SyslogReceiver) Flush()
Flush is a NOP in current implementation
func (*SyslogReceiver) ReceiveMessage ¶
func (s *SyslogReceiver) ReceiveMessage(message string, level seelog.LogLevel, context seelog.LogContextInterface) error
ReceiveMessage process current log message
type UnexpectedUnicodeCodepoint ¶
type UnexpectedUnicodeCodepoint struct {
// contains filtered or unexported fields
}
UnexpectedUnicodeCodepoint contains specifics about an occurrence of an unexpected unicode codepoint
func FindUnexpectedUnicode ¶
func FindUnexpectedUnicode(input string) []UnexpectedUnicodeCodepoint
FindUnexpectedUnicode reports any _unexpected_ unicode codepoints found in the given 'input' string Unexpected here generally means invisible whitespace and control chars
type Warnings ¶
Warnings represent the warnings in the config
func LoadCustom ¶
func LoadCustom(config Config, origin string, loadSecret bool, additionalKnownEnvVars []string) (*Warnings, error)
LoadCustom reads config into the provided config object
func LoadDatadogCustom ¶
func LoadWithoutSecret ¶
LoadWithoutSecret reads configs files, initializes the config module without decrypting any secrets
Source Files ¶
- apm.go
- config.go
- config_change_checker.go
- config_nix.go
- config_overrides.go
- environment.go
- environment_container_features.go
- environment_containers.go
- environment_detection.go
- legacy_converter.go
- log.go
- log_format.go
- log_nix.go
- mock.go
- otlp.go
- process.go
- standard_names.go
- system_probe.go
- types.go
- unexpectedunicodefinder.go
- viper.go
Directories ¶
Path | Synopsis |
---|---|
env
module
|
|
internal
|
|
logs
module
|
|
mock
module
|
|
model
module
|
|
nodetreemodel
module
|
|
Package resolver contains logic to perform per `transaction.Endpoint` domain resolution.
|
Package resolver contains logic to perform per `transaction.Endpoint` domain resolution. |
setup
module
|
|
structure
module
|
|
teeconfig
module
|
|