[Azure.Core] Configurable MaxApplicationIdLength#55199
Merged
m-redding merged 25 commits intoAzure:mainfrom Feb 13, 2026
Merged
[Azure.Core] Configurable MaxApplicationIdLength#55199m-redding merged 25 commits intoAzure:mainfrom
m-redding merged 25 commits intoAzure:mainfrom
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the maximum allowed DiagnosticsOptions.ApplicationId length configurable (while keeping the default at 24), and flows that configuration through telemetry user-agent generation.
Changes:
- Adds a
protected MaxApplicationIdLengthproperty onClientOptionsto let derived client option types increase the allowed ApplicationId length. - Wires the configured max length through
DiagnosticsOptionsand intoHttpPipelineBuilder/TelemetryDetailsso telemetry policy generation honors the configured limit. - Adds unit tests covering default and custom max-length behavior for both
TelemetryDetailsandClientOptions.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/core/Azure.Core/tests/TelemetryDetailsTests.cs | Adds tests validating default and custom ApplicationId length behavior in TelemetryDetails. |
| sdk/core/Azure.Core/tests/ClientOptionsTests.cs | Adds tests validating default/custom max length behavior and enforcement in DiagnosticsOptions.ApplicationId. |
| sdk/core/Azure.Core/src/TelemetryDetails.cs | Introduces a configurable max length parameter for ApplicationId validation (default 24). |
| sdk/core/Azure.Core/src/Pipeline/HttpPipelineBuilder.cs | Passes the configured max length into TelemetryDetails when building telemetry policy. |
| sdk/core/Azure.Core/src/DiagnosticsOptions.cs | Introduces internal MaxApplicationIdLength used by ApplicationId validation and copied in the copy ctor. |
| sdk/core/Azure.Core/src/ClientOptions.cs | Adds protected MaxApplicationIdLength surface for derived options. |
| sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs | API surface update for new ClientOptions.MaxApplicationIdLength. |
| sdk/core/Azure.Core/api/Azure.Core.net462.cs | API surface update for new ClientOptions.MaxApplicationIdLength. |
| sdk/core/Azure.Core/api/Azure.Core.net472.cs | API surface update for new ClientOptions.MaxApplicationIdLength. |
| sdk/core/Azure.Core/api/Azure.Core.net8.0.cs | API surface update for new ClientOptions.MaxApplicationIdLength. |
| sdk/core/Azure.Core/api/Azure.Core.net10.0.cs | API surface update for new ClientOptions.MaxApplicationIdLength. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
m-redding
commented
Feb 11, 2026
35877ad to
026f9a4
Compare
jsquire
reviewed
Feb 12, 2026
KrzysztofCwalina
approved these changes
Feb 12, 2026
jsquire
approved these changes
Feb 12, 2026
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.
This feature allows configuration of the max length for the application id which is part of the user agent header. This allows for library authors to set app ids longer than 24 characters.