Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch in resource attributes between metrics and everything else #12021

Open
jaronoff97 opened this issue Jan 6, 2025 · 3 comments · May be fixed by #11611
Open

Mismatch in resource attributes between metrics and everything else #12021

jaronoff97 opened this issue Jan 6, 2025 · 3 comments · May be fixed by #11611
Labels
bug Something isn't working

Comments

@jaronoff97
Copy link
Contributor

Describe the bug
When setting up the collector's self-telemetry, I found that metrics emit different resource attributes than the other signals.

Steps to reproduce

  1. download a collector v0.116.0 binary
  2. run the config provided
  3. grep for service.instance.id in the outputs to discover differing IDs

What did you expect to see?
A single and consistent service.instance.id in self-telemetry

What did you see instead?

logs service.instance.id: ca53d844-128d-4358-8978-8702c6bf3aad
traces service.instance.id: ca53d844-128d-4358-8978-8702c6bf3aad
opamp service.instance.id: ca53d844-128d-4358-8978-8702c6bf3aad
metrics service.instance.id: d768bfb1-6707-4b57-a96a-c89da7255388

What version did you use?
v0.116.0

What config did you use?

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:

exporters:
  debug:
    verbosity: detailed

service:
  telemetry:
    logs:
      processors:
        - batch:
            exporter:
              otlp:
                protocol: http/protobuf
                endpoint: http://localhost:4318/
    # push own metrics to the internal_metrics receiver
    traces:
      processors:
        - batch:
            exporter:
              otlp:
                protocol: grpc/protobuf
                endpoint: http://localhost:4317/
    metrics:
      level: detailed
      readers:
        - periodic:
            interval: 30000
            exporter:
              otlp:
                protocol: grpc/protobuf
                endpoint: localhost:4317
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug]

    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug]

    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug]

Environment
Mac OS 15.1

Additional context

@jaronoff97 jaronoff97 added the bug Something isn't working label Jan 6, 2025
@jaronoff97
Copy link
Contributor Author

I believe the issue is:
resource.New is called twice, once here where it's used for the go-contrib config package and once here only for meter provider

@jaronoff97
Copy link
Contributor Author

I'm happy to work on the fix here

@jaronoff97
Copy link
Contributor Author

will be solved by #11611

@jaronoff97 jaronoff97 linked a pull request Jan 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant