-
Notifications
You must be signed in to change notification settings - Fork 857
Add user agent customization #6686
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
Open
meijeran
wants to merge
11
commits into
open-telemetry:main
Choose a base branch
from
meijeran:add-user-agent-customization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add user agent customization #6686
meijeran
wants to merge
11
commits into
open-telemetry:main
from
meijeran:add-user-agent-customization
Conversation
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
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 <[email protected]>
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 <[email protected]>
Member
|
Looks OK to me now - the maintainers just need to be happy with how it presents as a new public API. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol
Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
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