Skip to content

service: configuration example for telemetry causes startup issue #12661

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

Closed
codeboten opened this issue Mar 18, 2025 · 7 comments
Closed

service: configuration example for telemetry causes startup issue #12661

codeboten opened this issue Mar 18, 2025 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@codeboten
Copy link
Contributor

Component(s)

service

What happened?

the basic config for emitting internal metrics through OTLP from the docs, which worked in 0.121.0, crashes the 0.122.0 Collector
with the message:

2025/03/18 19:10:19 collector server run finished with error: failed to create SDK: must not specify multiple metric reader type

Collector version

v0.122.0

Environment information

No response

OpenTelemetry Collector configuration

receivers:
  nop:
exporters:
  nop:
service:
  pipelines:
    logs:
      receivers: [nop]
      processors: []
      exporters: [nop]
  telemetry:
    metrics:
      readers:
        - periodic:
            exporter:
              otlp:
                protocol: http/protobuf
                endpoint: https://backend:4318

Log output

Additional context

No response

@codeboten codeboten added the bug Something isn't working label Mar 18, 2025
@TylerHelmuth
Copy link
Member

I am investigating

@TylerHelmuth TylerHelmuth self-assigned this Mar 18, 2025
@TylerHelmuth
Copy link
Member

I can see the issue is happening because the single Reader is getting configured with both the pull and periodic reader and the SDK rejects this. IDK yet why this is happening now.

Image

@codeboten
Copy link
Contributor Author

Further investigation by @TylerHelmuth, @evan-bradley and @dehaansa indicate this is related to b8830dd

@codeboten
Copy link
Contributor Author

a potential workaround, it seems configuring a pull reader as well as a periodic reader allows the collector to start:

service:
  telemetry:
    metrics:
      readers:
        - pull:
            exporter:
              prometheus:
                host: localhost
                port: 8889
        - periodic:
            exporter:
              otlp:
                protocol: http/protobuf
                endpoint: https://backend:4318

@jade-guiton-dd
Copy link
Contributor

Since the 0.122.1 tag has been released, should this be considered resolved?

@TylerHelmuth
Copy link
Member

TylerHelmuth commented Mar 19, 2025

Once open-telemetry/opentelemetry-collector-releases#882 is merged and tagged

@mx-psi
Copy link
Member

mx-psi commented Apr 15, 2025

Once open-telemetry/opentelemetry-collector-releases#882 is merged and tagged

Closing since this is done

@mx-psi mx-psi closed this as completed Apr 15, 2025
github-merge-queue bot pushed a commit that referenced this issue Apr 16, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

Adds a test for #12661 and another test present on #11882.

I verified that the first test fails in v0.123.0: on this version the
slice has `[]S{A: "A", B: "B"}` instead.
github-merge-queue bot pushed a commit that referenced this issue Apr 21, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

A second attempt at #11882.

Note that I added some tests in #12871 to prevent something like #12661
from happening again.

#### Link to tracking issue
Fixes #11749

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->

See tests from #12871 as well as the new tests added here.
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

No branches or pull requests

4 participants