Documentation ¶
Overview ¶
Package metadata is responsible for collecting host metadata from different providers such as EC2, ECS, AWS, etc and pushing it to Datadog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HostnamePreviewFeatureGate = featuregate.GlobalRegistry().MustRegister( "exporter.datadog.hostname.preview", featuregate.StageBeta, featuregate.WithRegisterDescription("Use the 'preview' hostname resolution rules, which are consistent with Datadog cloud integration hostname resolution rules, and set 'host_metadata::hostname_source' to 'config_or_system' by default."), featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10424"), )
Functions ¶
func GetSourceProvider ¶ added in v0.54.0
Types ¶
type HostMetadata ¶
type HostMetadata struct { // Meta includes metadata about the host. Meta *Meta `json:"meta"` // InternalHostname is the canonical hostname InternalHostname string `json:"internalHostname"` // Version is the OpenTelemetry Collector version. // This is used for correctly identifying the Collector in the backend, // and for telemetry purposes. Version string `json:"otel_version"` // Flavor is always set to "opentelemetry-collector". // It is used for telemetry purposes in the backend. Flavor string `json:"agent-flavor"` // Tags includes the host tags Tags *HostTags `json:"host-tags"` // Payload contains inventory of system information provided by gohai // this is embedded because of special serialization requirements // the field `gohai` is JSON-formatted string gohai.Payload // Processes contains the process payload devired by gohai // Because of legacy reasons this is called resources in datadog intake Processes *gohai.ProcessesPayload `json:"resources"` }
HostMetadata includes metadata about the host tags, host aliases and identifies the host as an OpenTelemetry host
type HostTags ¶
type HostTags struct { // OTel are host tags set in the configuration OTel []string `json:"otel,omitempty"` // GCP are Google Cloud Platform tags GCP []string `json:"google cloud platform,omitempty"` }
HostTags are the host tags. Currently only system (configuration) tags are considered.
type Meta ¶
type Meta struct { // InstanceID is the EC2 instance id the Collector is running on, if available InstanceID string `json:"instance-id,omitempty"` // EC2Hostname is the hostname from the EC2 metadata API EC2Hostname string `json:"ec2-hostname,omitempty"` // Hostname is the canonical hostname Hostname string `json:"hostname"` // SocketHostname is the OS hostname SocketHostname string `json:"socket-hostname,omitempty"` // SocketFqdn is the FQDN hostname SocketFqdn string `json:"socket-fqdn,omitempty"` // HostAliases are other available host names HostAliases []string `json:"host_aliases,omitempty"` }
Meta includes metadata about the host aliases
type PusherConfig ¶ added in v0.48.0
type PusherConfig struct { // ConfigHosthame is the hostname set in the configuration of the exporter (empty if unset). ConfigHostname string // ConfigTags are the tags set in the configuration of the exporter (empty if unset). ConfigTags []string // MetricsEndpoint is the metrics endpoint. MetricsEndpoint string // APIKey is the API key set in configuration. APIKey string // UseResourceMetadata is the value of 'use_resource_metadata' on the top-level configuration. UseResourceMetadata bool // InsecureSkipVerify is the value of `tls.insecure_skip_verify` on the configuration. InsecureSkipVerify bool // TimeoutSettings of exporter. TimeoutSettings exporterhelper.TimeoutSettings // RetrySettings of exporter. RetrySettings exporterhelper.RetrySettings }
PusherConfig is the configuration for the metadata pusher goroutine.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
azure
Package azure contains the Azure hostname provider
|
Package azure contains the Azure hostname provider |
ec2
Package ec2 contains the AWS EC2 hostname provider
|
Package ec2 contains the AWS EC2 hostname provider |
ecs
Package ecs contains the ECS Fargate hostname provider
|
Package ecs contains the ECS Fargate hostname provider |
gcp
Package gcp contains the GCP hostname provider
|
Package gcp contains the GCP hostname provider |
gohai
package gohai provides system information like cpu, memory in a format that is expected by the datadog intake
|
package gohai provides system information like cpu, memory in a format that is expected by the datadog intake |
k8s
Package k8s contains the Kubernetes hostname provider
|
Package k8s contains the Kubernetes hostname provider |
system
Package system contains the system hostname provider
|
Package system contains the system hostname provider |
Package provider contains the cluster name provider
|
Package provider contains the cluster name provider |
Package valid contains functions that validate hostnames
|
Package valid contains functions that validate hostnames |
Click to show internal directories.
Click to hide internal directories.