Skip to content

[telemetry] Setting service.name on own telemetry has no effect for traces #10489

@jpkrohling

Description

@jpkrohling

Describe the bug

Setting the service.name on the telemetry settings for the Collector has no effect, and traces generated by the Collector have no service name attacked (not even a default one). Internal metrics are handling this correctly.

Steps to reproduce

receivers:
  otlp:
    protocols:
      http:

exporters:
  debug:

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [debug]
    metrics:
      receivers: [otlp]
      exporters: [debug]
    logs:
      receivers: [otlp]
      exporters: [debug]
  telemetry:
    traces:
      processors:
        - batch:
            exporter:
              otlp:
                endpoint: http://127.0.0.1:5317
                protocol: grpc/protobuf
    resource:
      "service.name": "otelcol-own-telemetry"

What did you expect to see?
On a second Collector on port 5317, I would expect to see this on the traces received:

Resource SchemaURL: https://opentelemetry.io/schemas/1.25.0
Resource attributes:
     -> service.name: **Str(otelcol-own-telemetry)**

What did you see instead?

Resource SchemaURL: https://opentelemetry.io/schemas/1.25.0
Resource attributes:
     -> service.name: Str(unknown_service:otelcol-contrib)

What version did you use?
0.103.1

Metadata

Metadata

Assignees

Labels

area:servicebugSomething isn't workingcollector-telemetryhealthchecker and other telemetry collection issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions