Skip to content

Conversation

@rads-1996
Copy link
Member

@rads-1996 rads-1996 commented Jan 14, 2026

Description

Fix the formatting for the fixed percentage sampler to be consistent with other languages.

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.

@rads-1996 rads-1996 requested a review from lzchen as a code owner January 14, 2026 17:28
Copilot AI review requested due to automatic review settings January 14, 2026 17:28
@github-actions github-actions bot added the Monitor - Distro Monitor OpenTelemetry Distro label Jan 14, 2026
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 PR updates the format of the fixed percentage sampler constant from microsoft.fixed.percentage (with dots) to microsoft.fixed_percentage (with underscores) to be consistent with other languages like the microsoft.rate_limited sampler format. The change maintains backward compatibility by accepting both formats.

Changes:

  • Updated the constant value from microsoft.fixed.percentage to microsoft.fixed_percentage
  • Added backward compatibility support to accept both formats
  • Updated documentation and samples to reflect the new format
  • Added a test case to verify backward compatibility works correctly

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_constants.py Changed the FIXED_PERCENTAGE_SAMPLER constant value from "microsoft.fixed.percentage" to "microsoft.fixed_percentage"
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_utils/configurations.py Added backward compatibility check to accept both old and new formats, and added null safety checks for sampler_arg
sdk/monitor/azure-monitor-opentelemetry/README.md Updated documentation to reference the new format "microsoft.fixed_percentage"
sdk/monitor/azure-monitor-opentelemetry/samples/tracing/sampling_configurations.py Updated sample code comment to use the new format "microsoft.fixed_percentage"
sdk/monitor/azure-monitor-opentelemetry/tests/utils/test_configurations.py Added test case to verify backward compatibility with the old format "microsoft.fixed.percentage"

@rads-1996 rads-1996 marked this pull request as draft January 14, 2026 17:50
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.

1 participant