OpenTelemetry Semantic Conventions and Datadog Conventions

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

OpenTelemetry makes use of a number of semantic conventions that specify names for different types of data. This page lists mappings for OpenTelemetry semantic conventions to Datadog’s semantic conventions.

Unified Service Tagging

For OpenTelemetry applications, unified service tagging is supported for only metrics and traces, not logs.
OpenTelemetry conventionDatadog convention
deployment.environmentenv
service.nameservice
service.versionversion

For more information, see Unified Service Tagging.

Containers

OpenTelemetry conventionDatadog convention
container.idcontainer_id
container.namecontainer_name
container.image.nameimage_name
container.image.tagimage_tag

Read more about Containers semantic conventions in the OpenTelemetry documentation.

Additional cloud provider-specific attributes are also mapped.

Cloud

OpenTelemetry conventionDatadog convention
cloud.providercloud_provider
cloud.regionregion
cloud.availability_zonezone

ECS

OpenTelemetry conventionDatadog convention
aws.ecs.task.familytask_family
aws.ecs.task.arntask_arn
aws.ecs.cluster.arnecs_cluster_name
aws.ecs.task.revisiontask_version
aws.ecs.container.arnecs_container_name

Kubernetes

OpenTelemetry conventionDatadog convention
k8s.container.namekube_container_name
k8s.cluster.namekube_cluster_name
k8s.deployment.namekube_deployment
k8s.replicaset.namekube_replica_set
k8s.statefulset.namekube_stateful_set
k8s.daemonset.namekube_daemon_set
k8s.job.namekube_job
k8s.cronjob.namekube_cronjob
k8s.namespace.namekube_namespace
k8s.pod.namepod_name

Kubernetes labels

Kubernetes conventionDatadog convention
app.kubernetes.io/namekube_app_name
app.kubernetes.io/instancekube_app_instance
app.kubernetes.io/versionkube_app_version
app.kuberenetes.io/componentkube_app_component
app.kubernetes.io/part-ofkube_app_part_of
app.kubernetes.io/managed-bykube_app_managed_by

Metrics attribute mapping

For metrics, by default, Datadog only maps the OpenTelemetry resource attributes listed in the previous sections to Datadog metric tags. To map all resource attributes to tags, enable the metrics::resource_attributes_as_tags setting:

exporters:
  datadog:
    # Other configuration goes here...
    metrics:
      # Add all resource attributes as tags for metrics
      resource_attributes_as_tags: true
otlp_config:
  # Other configuration goes here...
  metrics:
    # Add all resource attributes as tags for metrics
    resource_attributes_as_tags: true

Enabling this option adds both the OpenTelemetry resource attributes and the Datadog semantic conventions to the metric tags.

Further reading