Skip to content

Conversation

@rads-1996
Copy link
Member

Description

Default Sampler: Rate Limited Sampler
Default Argument: 5.0 traces per second

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

@github-actions github-actions bot added the Monitor - Distro Monitor OpenTelemetry Distro label Jan 29, 2026
@rads-1996 rads-1996 marked this pull request as ready for review January 30, 2026 16:01
Copilot AI review requested due to automatic review settings January 30, 2026 16:01
@rads-1996 rads-1996 force-pushed the change-default-sampler branch from cd13b7e to c136263 Compare January 30, 2026 16:08
Copy link
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 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)

Copy link
Member

@JacksonWeber JacksonWeber left a comment

Choose a reason for hiding this comment

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

LGTM

@rads-1996 rads-1996 force-pushed the change-default-sampler branch from 1429faf to 342b0b8 Compare January 30, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Distro Monitor OpenTelemetry Distro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants