Skip to content

Use constants to decide distro version in the exporter#46613

Merged
rads-1996 merged 4 commits into
Azure:mainfrom
rads-1996:fix-sdk-version-exp
May 1, 2026
Merged

Use constants to decide distro version in the exporter#46613
rads-1996 merged 4 commits into
Azure:mainfrom
rads-1996:fix-sdk-version-exp

Conversation

@rads-1996
Copy link
Copy Markdown
Member

@rads-1996 rads-1996 commented Apr 30, 2026

Description

Populate the different distro names based on the naming convention.

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.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings April 30, 2026 00:30
@github-actions github-actions Bot added the Monitor - Exporter Monitor OpenTelemetry Exporter label Apr 30, 2026
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

Updates the exporter’s internal SDK version string generation so it can report different “distribution” identifiers based on standardized environment variable names, and adds unit tests covering the new formatting/priority rules.

Changes:

  • Add SDK-version-related environment variable constants and use them in _utils._get_sdk_version().
  • Extend _get_sdk_version() formatting to emit mot (Microsoft OpenTelemetry) or dst (Azure Monitor distro) when corresponding env vars are present, with mot taking priority.
  • Add unit tests to validate default, distro, Microsoft OTel, and priority behaviors.

Reviewed changes

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

File Description
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_utils.py Adds coverage for _get_sdk_version() across default/distro/Microsoft OTel scenarios and priority behavior.
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_utils.py Implements env-var-driven SDK version string variants and prioritization logic.
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_constants.py Introduces constants for SDK-version environment variable names.

@rads-1996 rads-1996 force-pushed the fix-sdk-version-exp branch from 70e99f4 to 71dc561 Compare April 30, 2026 15:15
@rads-1996 rads-1996 merged commit 6b09763 into Azure:main May 1, 2026
19 checks passed
@rads-1996 rads-1996 deleted the fix-sdk-version-exp branch May 1, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Exporter Monitor OpenTelemetry Exporter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants