open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.12k stars 2.39k forks source link

[datadogexporter/datadogconnector] OpenTelemetry Missing Tags in APM Stats while upgrading to 0.95.0 #36329

Open JM89 opened 1 week ago

JM89 commented 1 week ago

Component(s)

No response

What happened?

Description

I am publishing traces from EKS Services to DataDog using otel/opentelemetry-collector-contrib:0.94.0. I have been trying to upgrade to the latest version, but could not go beyond 0.95.0 without breaking most of our alerting system which relies heavily on APM Metrics and specific tags being present.

I went through reusing the Datadog Connector as described here and here; and “trace.Microsoft.AspNetCore.server.hits” APM metrics now appear in DataDog, but without any of the custom tags available in the APM traces. I can see a number of options in the datadog connector (e.g. peer_tags) but none worked. The tags service, env and resource_name seems to go through, but not “host” or anything custom.

Is this behavior expected? Can these tags be available the same way they used to be? Is there a better way of doing this?

Steps to Reproduce

Upgrade the OpenTelemetryCollector sidecar from 0.94.0 to 0.95.0 and reuse datadog connector as configured below. Note that this was tried with v0.113.0 as well.

Expected Result

The computed APM Metrics contain the same tags as the APM traces.

Actual Result

The computed APM Metrics contain only service, env, and resource_name. The tag "host" is set to "none" and custom tags are not available.

Collector version

v0.95.0

Environment information

Environment

OpenTelemetry Collector configuration

receivers:
      otlp:
        protocols:
          grpc:
          http:
processors: 
  batch:
    timeout: 10s
connectors:
    datadog/connector:
exporters:
  datadog:
    api:
      key: ${env:DD_API_KEY}
      site: ${env:DD_SITE}
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [datadog/connector]
    traces/2:
      receivers: [datadog/connector]
      processors: [batch]
      exporters: [datadog]
    metrics:
      receivers: [datadog/connector]
      processors: [batch]
      exporters: [datadog]

Log output

No response

Additional context

No response

jackgopack4 commented 5 days ago

Can you share a sample trace with the tags applied? Also have you opened a ticket with Datadog support?

Also, there have been some improvements/fixes relating to tagging between versions 0.95.0 and the current version 0.114.0 so if you are able to try a newer version that might be helpful as well.