Change default sampler to Rate Limited Sampler#44925
Merged
rads-1996 merged 10 commits intoAzure:mainfrom Feb 3, 2026
Merged
Conversation
cd13b7e to
c136263
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request changes the default sampling behavior for the Azure Monitor OpenTelemetry distribution from ApplicationInsightsSampler with 100% sampling to RateLimitedSampler with 5.0 traces per second. This is a significant behavioral change aimed at reducing telemetry volume and costs for high-traffic applications.
Changes:
- Changed default sampler from ApplicationInsightsSampler (100% sampling) to RateLimitedSampler (5 traces/second)
- Updated configuration logic to prioritize RateLimitedSampler when no explicit sampler is configured
- Updated tests to reflect the new default value of 5.0 traces per second
- Updated documentation and samples to reflect the new default behavior
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py | Swapped priority order in sampler selection - now checks sampling_ratio first, then defaults to traces_per_second with RateLimitedSampler |
| sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_utils/configurations.py | Updated default sampling configuration to use 5.0 traces per second for RateLimitedSampler instead of 1.0 for ApplicationInsightsSampler |
| sdk/monitor/azure-monitor-opentelemetry/tests/utils/test_configurations.py | Updated test assertions to expect traces_per_second=5.0 as the default instead of sampling_ratio=1.0 |
| sdk/monitor/azure-monitor-opentelemetry/samples/tracing/sampling_configurations.py | Updated sample documentation to reflect new default sampler and added code examples (with syntax errors) |
| sdk/monitor/azure-monitor-opentelemetry/README.md | Updated documentation to describe the new default sampler and added reference link (with typo) |
| sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md | Added entry describing the behavioral change (incorrectly categorized as feature instead of breaking change) |
sdk/monitor/azure-monitor-opentelemetry/samples/tracing/sampling_configurations.py
Show resolved
Hide resolved
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_utils/configurations.py
Show resolved
Hide resolved
sdk/monitor/azure-monitor-opentelemetry/samples/tracing/sampling_configurations.py
Outdated
Show resolved
Hide resolved
sdk/monitor/azure-monitor-opentelemetry/samples/tracing/sampling_configurations.py
Show resolved
Hide resolved
1429faf to
342b0b8
Compare
d057997 to
b42f320
Compare
lzchen
approved these changes
Feb 3, 2026
JacksonWeber
approved these changes
Feb 3, 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.
Description
Default Sampler:
Rate Limited SamplerDefault Argument:
5.0 traces per secondAll SDK Contribution checklist:
General Guidelines and Best Practices