Add user agent customization#6686
Merged
Kielek merged 20 commits intoopen-telemetry:mainfrom Dec 4, 2025
Merged
Conversation
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
e8fab7f to
3d05c14
Compare
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
…ptions.cs Co-authored-by: Martin Costello <martin@martincostello.com>
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
…ptions.cs Co-authored-by: Martin Costello <martin@martincostello.com>
Member
|
Looks OK to me now - the maintainers just need to be happy with how it presents as a new public API. |
cijothomas
reviewed
Nov 19, 2025
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
martincostello
approved these changes
Nov 21, 2025
Co-authored-by: Martin Costello <martin@martincostello.com>
Member
|
@meijeran The directions look good. Could you please resolve the build issue? Also, please make sure not to include any unrelated changes in this PR. |
Kielek
reviewed
Nov 25, 2025
Kielek
reviewed
Nov 25, 2025
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/PublicAPI.Shipped.txt
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6686 +/- ##
==========================================
+ Coverage 86.77% 86.81% +0.04%
==========================================
Files 258 258
Lines 11990 11993 +3
==========================================
+ Hits 10404 10412 +8
+ Misses 1586 1581 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Kielek
reviewed
Nov 27, 2025
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
rajkumar-rangaraj
approved these changes
Dec 3, 2025
Kielek
approved these changes
Dec 4, 2025
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6496
Design discussion issue #
Changes
Please provide a brief description of the changes here.
This pull request enhances the configuration of the
User-AgentHTTP header in theOtlpExporterOptionsclass, allowing users to prepend custom product identifiers to the default exporter information. It introduces a new property for customization, updates header construction logic, and adds comprehensive tests to ensure correct behavior and compliance with HTTP standards.User-Agent customization improvements:
UserAgentProductIdentifierproperty toOtlpExporterOptionsthat allows users to specify a custom product identifier to be prepended to the defaultUser-Agentheader. The header updates dynamically when this property changes.User-Agentstring to include the custom identifier, ensuring proper formatting and RFC 7231 compliance (space-separated tokens).StandardHeadersfrom a static readonly array to a static property backed by a private field, so it reflects the current user agent identifier. [1] [2]Testing enhancements:
OtlpExporterOptionsTests.csto verify the default and custom behaviors of theUserAgentProductIdentifierproperty, including handling of empty/whitespace values, correct header formatting, and compliance with HTTP standards.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes