Skip to content

[receiver/datadog] service.name not set at trace resource resulting in OTLPResourceNoServiceName #21210

Description

@mvadu

Component(s)

receiver/datadog

What happened?

Description

Currently in addResourceData service.name is not set. Its set in the span attributes. Because of this traces exported to backends like Grafana tempo are appearing as OTLPResourceNoServiceName.

Steps to Reproduce

receivers:
 otlp:
   protocols:
     grpc:
     http:
       cors:
         allowed_origins:
           - "http://*"
           - "https://*"
 datadog:
   endpoint: 0.0.0.0:8126
   read_timeout: 60s

exporters:
 otlp:
   endpoint: tempo:4317
   tls:
     insecure: true 
 logging:
 prometheus:
   endpoint: "otelcol:9464"
   resource_to_telemetry_conversion:
     enabled: true
   enable_open_metrics: true

processors:
 batch:

service:
 pipelines:
   traces:
     receivers: [datadog]
     processors: [batch]
     exporters: [otlp]
  • Validate the traces received in Tempo

Expected Result

The service Name should be populated in Service Name filter which uses the Resources section
ref:

Actual Result

The Resource section does not contains a service.name tag, thus resulting in OTLPResourceNoServiceName
image

Collector version

v0.75.0

Environment information

Environment

OS: Ubuntu 20

OpenTelemetry Collector configuration

receivers:
 otlp:
   protocols:
     grpc:
     http:
       cors:
         allowed_origins:
           - "http://*"
           - "https://*"
 datadog:
   endpoint: 0.0.0.0:8126
   read_timeout: 60s

exporters:
 otlp:
   endpoint: tempo:4317
   tls:
     insecure: true 
 logging:
 prometheus:
   endpoint: "otelcol:9464"
   resource_to_telemetry_conversion:
     enabled: true
   enable_open_metrics: true

processors:
 batch:

service:
 pipelines:
   traces:
     receivers: [datadog]
     processors: [batch]
     exporters: [otlp]

Log output

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions