Documentation
¶
Index ¶
- Constants
- func ContainerTagFromAttributes(attr map[string]string) map[string]string
- func ContainerTagsFromResourceAttributes(attrs pcommon.Map) map[string]string
- func OriginIDFromAttributes(attrs pcommon.Map) (originID string)
- func SourceFromAttrs(attrs pcommon.Map) (source.Source, bool)
- func TagsFromAttributes(attrs pcommon.Map) []string
Constants ¶
const ( // AttributeDatadogHostname the datadog host name attribute AttributeDatadogHostname = "datadog.host.name" // AttributeK8sNodeName the datadog k8s node name attribute AttributeK8sNodeName = "k8s.node.name" // Attribute host is a literal host tag. // We check for this to avoid double tagging. AttributeHost = "host" )
Variables ¶
This section is empty.
Functions ¶
func ContainerTagFromAttributes ¶
ContainerTagFromAttributes extracts the value of _dd.tags.container from the given set of attributes. Deprecated: Deprecated in favor of ContainerTagFromResourceAttributes.
func ContainerTagsFromResourceAttributes ¶ added in v0.8.1
ContainerTagFromResourceAttributes extracts container tags from the given set of resource attributes. Container tags are extracted via semantic conventions. Customer container tags are extracted via resource attributes prefixed by datadog.container.tag. Custom container tag values of a different type than ValueTypeStr will be ignored. In the case of duplicates between semantic conventions and custom resource attributes (e.g. container.id, datadog.container.tag.container_id) the semantic convention takes precedence.
func OriginIDFromAttributes ¶
OriginIDFromAttributes gets the origin IDs from resource attributes. If not found, an empty string is returned for each of them.
func SourceFromAttrs ¶ added in v0.1.3
SourceFromAttrs gets a telemetry signal source from its attributes.
func TagsFromAttributes ¶
TagsFromAttributes converts a selected list of attributes to a tag list that can be added to metrics.
Types ¶
This section is empty.