Skip to content

Conversation

@bachgarash
Copy link

@bachgarash bachgarash commented Dec 3, 2025

This PR fixes #4412 which should add metric and trace endpoints implicitly. Current implementation is a bit untidy and not complying with other languages such as Golang. I am happy to discuss more if it is not clear.

OTel sdk general config https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_endpoint

Description

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@bachgarash bachgarash requested a review from a team as a code owner December 3, 2025 11:37
This PR fixes open-telemetry#4412 which should add metric and trace endpoints implicitly when endpoint argument is passed.

OTel sdk general config https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_endpoint
@bachgarash bachgarash force-pushed the fix/add-endpoints-implicitly-by-sdk branch from 80b1424 to 55979b9 Compare December 3, 2025 12:08
@herin049
Copy link

herin049 commented Dec 5, 2025

Not really sure if I understand the issue here. It looks like /v1/{{signal}} is already being appended to the OTEL_EXPORTER_OTLP_ENDPOINT endpoint if it is provided. I think the expectation here is that if the user populates OTEL_EXPORTER_OTLP_{{signal}}_ENDPOINT they are likely explicitly passing a full url and likely don't want /v1/{{signal}} appended to it. The spec doesn't seem to clarify this point, but it looks like the other implementations notably JavaScript and Golang both exhibit this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically add /v1/metrics to endpoints

2 participants