Skip to content

[Azure.Core] Configurable MaxApplicationIdLength#55199

Merged
m-redding merged 25 commits intoAzure:mainfrom
m-redding:appidlength
Feb 13, 2026
Merged

[Azure.Core] Configurable MaxApplicationIdLength#55199
m-redding merged 25 commits intoAzure:mainfrom
m-redding:appidlength

Conversation

@m-redding
Copy link
Copy Markdown
Member

@m-redding m-redding commented Jan 22, 2026

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.

@m-redding m-redding changed the title POC remove limits on application id length POC configurable Jan 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 23, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.Core

@m-redding m-redding changed the title POC configurable POC configurable application id length Jan 23, 2026
@m-redding m-redding changed the title POC configurable application id length [Azure.Core] Configurable MaxApplicationIdLength Jan 24, 2026
@m-redding m-redding requested a review from Copilot January 24, 2026 00:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 MaxApplicationIdLength property on ClientOptions to let derived client option types increase the allowed ApplicationId length.
  • Wires the configured max length through DiagnosticsOptions and into HttpPipelineBuilder/TelemetryDetails so telemetry policy generation honors the configured limit.
  • Adds unit tests covering default and custom max-length behavior for both TelemetryDetails and ClientOptions.

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.

m-redding and others added 5 commits January 23, 2026 18:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

@m-redding m-redding marked this pull request as ready for review February 12, 2026 22:03
@m-redding m-redding requested a review from a team as a code owner February 12, 2026 22:03
@m-redding m-redding merged commit 81e7411 into Azure:main Feb 13, 2026
43 checks passed
@m-redding m-redding deleted the appidlength branch February 13, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants