-
Notifications
You must be signed in to change notification settings - Fork 826
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
feat(otlp-trace-exporters): Add User-Agent header to OTLP trace exporters #3790
feat(otlp-trace-exporters): Add User-Agent header to OTLP trace exporters #3790
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3790 +/- ##
==========================================
- Coverage 93.22% 92.54% -0.69%
==========================================
Files 293 282 -11
Lines 8883 8326 -557
Branches 1825 1721 -104
==========================================
- Hits 8281 7705 -576
- Misses 602 621 +19
|
I believe it is better making the implementations in the base packages ( |
That depends on browser implementation. Chrome Browser currently doesn't support that. I think we can just ignore the warnings. |
I started there, but because of the way the headers are built currently, I need them added in the individual exporters. The headers for each exporter are intended to override the generic variables. For example, the |
I was getting errors when running tests. It's possible the issue is that I tried overwriting user agent instead of appending 🤔 I'm definitely less familiar with the browser implementations.
|
Let's see what we can do after #3748 being fixed which will change the way headers are merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this 🙂
I've tried this before but ran into the exact same problem with it not working in the base exporter. 😞
(I'm actually working to refactor some the exporters/exporter bases to make them easier to work with - hopefully this will help in simplifying how we build the headers, but I think this PR is a great first step. 🙂)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with the caveat that backends consuming browser data will not be able to rely on the User-Agent header to determine the browser brand/version. This just highlights the importance of using the browser resource attributes instead.
…ce exporters (open-telemetry#3790)" This reverts commit 758c7af.
…ce exporters (open-telemetry#3790)" This reverts commit 758c7af.
…ce exporters (open-telemetry#3790)" This reverts commit 758c7af.
…ce exporters (open-telemetry#3790)" This reverts commit 758c7af.
…ce exporters (open-telemetry#3790)" This reverts commit 758c7af.
Which problem is this PR solving?
Updates #3291
Short description of the changes
I tried adding this to the browser exporter but get an error for setting an Unsafe Header.
This should no longer be forbidden but I wasn't sure what I was missing.
Edit: I believe this was erroring because it would overwrite the existing User Agent. Either way, this PR does not make changes to the browser implementation and instead focuses on just Node exporters.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist: