[Azure Monitor AspNetCore] Plumb EnableStandardMetrics and EnablePerfCounters#56438
Merged
mattsains-msft merged 3 commits intoAzure:mainfrom Feb 24, 2026
Merged
[Azure Monitor AspNetCore] Plumb EnableStandardMetrics and EnablePerfCounters#56438mattsains-msft merged 3 commits intoAzure:mainfrom
mattsains-msft merged 3 commits intoAzure:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes the Azure Monitor Exporter configuration flags EnableStandardMetrics and EnablePerfCounters through the Azure.Monitor.OpenTelemetry.AspNetCore distribution, and verifies the values flow through DI configuration into AzureMonitorExporterOptions.
Changes:
- Added
EnableStandardMetricsandEnablePerfCounterstoAzureMonitorOptionswith default values and XML docs. - Plumbed the new option values into
AzureMonitorExporterOptionsviaSetValueToExporterOptions. - Added unit tests covering defaults, disabling, and propagation through
UseAzureMonitor(...)DI configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/AzureMonitorOptions.cs | Adds the two public options and copies them into exporter options during configuration. |
| sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/AzureMonitorOptionsTests.cs | Adds tests verifying defaults and end-to-end propagation into AzureMonitorExporterOptions. |
rajkumar-rangaraj
approved these changes
Feb 24, 2026
This was referenced May 1, 2026
Open
Bump Azure.Extensions.AspNetCore.Configuration.Secrets from 1.3.1 to 1.5.1
khoinguyennn/eShopOnWeb#5
Open
intellitect-bot
pushed a commit
to IntelliTect/EssentialCSharp.Web
that referenced
this pull request
May 4, 2026
Updated [Azure.Monitor.OpenTelemetry.AspNetCore](https://github.com/Azure/azure-sdk-for-net) from 1.4.0 to 1.5.0. <details> <summary>Release notes</summary> _Sourced from [Azure.Monitor.OpenTelemetry.AspNetCore's releases](https://github.com/Azure/azure-sdk-for-net/releases)._ ## 1.5.0 ## 1.5.0 (2026-04-30) ### Features Added * Add ability to specify EnableStandardMetrics and EnablePerformanceCounters ([#56438](Azure/azure-sdk-for-net#56438)) ### Breaking Changes * **Default Sampler Changed**: The default sampling behavior has been changed from `ApplicationInsightsSampler` with 100% sampling (all traces sampled) to `RateLimitedSampler` with 5.0 traces per second. This change significantly reduces telemetry volume for high-traffic applications and provides better cost optimization out of the box. **Impact**: Applications with more than 5 requests per second will see fewer traces exported by default. **Migration**: To maintain the previous behavior (100% sampling), explicitly configure the sampler: ```csharp // Option 1: Set SamplingRatio and clear TracesPerSecond builder.Services.AddOpenTelemetry() .UseAzureMonitor(options => { options.SamplingRatio = 1.0f; options.TracesPerSecond = null; }); // Option 2: Use environment variables // OTEL_TRACES_SAMPLER=microsoft.fixed_percentage // OTEL_TRACES_SAMPLER_ARG=1.0 ``` ### Bugs Fixed * Fixed an issue where Azure Container Apps instances were showing VM instance GUIDs instead of replica names in the Role Instance field. ([#54586](Azure/azure-sdk-for-net#54586)) ## 1.5.0-beta.1 ## 1.5.0-beta.1 (2026-04-28) ### Features Added - Upgraded api-version tag from `package-2024-05-01` to `package-preview-2025-06`. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/main/specification/appconfiguration/resource-manager/readme.md. - Added `AzureFrontDoor` property to `AppConfigurationStoreData` and `AppConfigurationStorePatch` to support Azure Front Door configuration for a configuration store. - Added new model `AppConfigurationAzureFrontDoorProperties` with a `ResourceId` property representing an Azure Front Door profile resource ID. ## 1.4.2 ## 1.4.2 (2026-04-28) ### Other Changes - Upgraded dependent `Azure.Core` to 1.54.0. - Upgraded dependent `Azure.ResourceManager` to 1.14.0. ## 1.4.1 ## 1.4.1 (2026-04-27) ### Other Changes - Upgraded dependent `Azure.Core` to 1.54.0. - Upgraded dependent `Azure.ResourceManager` to 1.14.0. Commits viewable in [compare view](https://github.com/Azure/azure-sdk-for-net/commits/Azure.Monitor.OpenTelemetry.AspNetCore_1.5.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced May 4, 2026
Bump Azure.Extensions.AspNetCore.Configuration.Secrets from 1.3.2 to 1.5.1
Shivakumarmv/eShopOnWeb#9
Open
Open
Closed
Closed
Closed
Open
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 adds the recently-made-public config options EnableStandardMetrics and EnablePerfCounters of Azure Monitor Exporter into the AspNetCore distribution.