attributes

package
v0.33.0-rc.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// AttributeDatadogHostname the datadog host name attribute
	AttributeDatadogHostname = "datadog.host.name"
	// AttributeK8sNodeName the datadog k8s node name attribute
	AttributeK8sNodeName = "k8s.node.name"
)

Variables

This section is empty.

Functions

func ContainerTagFromAttributes added in v0.33.0

func ContainerTagFromAttributes(attr map[string]string) string

ContainerTagFromAttributes extracts the value of _dd.tags.container from the given set of attributes.

func HostnameFromAttributes

func HostnameFromAttributes(attrs pdata.AttributeMap) (string, bool)

HostnameFromAttributes tries to get a valid hostname from attributes by checking, in order:

  1. a custom Datadog hostname provided by the "datadog.host.name" attribute

  2. the Kubernetes node name (and cluster name if available),

  3. cloud provider specific hostname for AWS or GCP

  4. the container ID,

  5. the cloud provider host ID and

  6. the host.name attribute.

    It returns a boolean value indicated if any name was found

func TagsFromAttributes

func TagsFromAttributes(attrs pdata.AttributeMap) []string

TagsFromAttributes converts a selected list of attributes to a tag list that can be added to metrics.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL