Skip to content

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented Jun 12, 2025

Description

We would like being able to use a specific user agent on our distro in order to discriminate OTLP traffic between our distro and upstream. At the moment this is not possible because HTTP exporters always override the passed headers with the default ones.

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

  • tox

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

@xrmx xrmx requested a review from a team as a code owner June 12, 2025 13:42
@xrmx xrmx moved this to Ready for review in @xrmx's Python PR digest Jun 12, 2025
@xrmx xrmx changed the title Permit to override exporter headers Permit to override default OTLP exporter headers Jun 12, 2025
@xrmx xrmx self-assigned this Jun 12, 2025
Copy link
Contributor Author

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if instead of that we should make the default headers substituted via an entry point (or even make them a param for the init functions called by _initialize_components) so that we have a different mechanism that the user cannot easily override. This is because otherwise users setting OTEL_EXPORTER_OTLP_HEADERS will always override what distro sets.

@xrmx xrmx moved this from Ready for review to Reviewed PR that needs fixing in @xrmx's Python PR digest Jun 24, 2025
@xrmx xrmx marked this pull request as draft June 24, 2025 07:21
@xrmx xrmx changed the title Permit to override default OTLP exporter headers Permit to override default OTLP HTTP exporter headers Aug 14, 2025
@xrmx xrmx requested a review from emdneto August 14, 2025 09:58
@xrmx xrmx force-pushed the override-exporter-headers branch from dadd176 to 6f3b497 Compare August 14, 2025 09:58
@xrmx xrmx moved this from Reviewed PR that needs fixing to Ready for review in @xrmx's Python PR digest Aug 14, 2025
@xrmx xrmx marked this pull request as ready for review August 14, 2025 09:59
@xrmx xrmx force-pushed the override-exporter-headers branch from 6f3b497 to 68776af Compare August 14, 2025 09:59
@xrmx
Copy link
Contributor Author

xrmx commented Aug 14, 2025

So this updates the otlp http exporters to match what the grpc ones are doing wrt channel_options that is that users are able to override the defaults but not remove them.

@xrmx
Copy link
Contributor Author

xrmx commented Aug 21, 2025

Related to this the specs is being updated for allowing the update of users of the user agent: open-telemetry/opentelemetry-specification#4560

@xrmx xrmx merged commit 64de448 into open-telemetry:main Aug 29, 2025
468 of 469 checks passed
@github-project-automation github-project-automation bot moved this from Ready for review to Done in @xrmx's Python PR digest Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants