Skip to content

Conversation

@rads-1996
Copy link
Member

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 - Exporter Monitor OpenTelemetry Exporter label Jan 27, 2026
@rads-1996
Copy link
Member Author

Success Count -
image

Dropped Count -
image

Retry Count -
image

@rads-1996 rads-1996 marked this pull request as ready for review January 27, 2026 17:07
Copilot AI review requested due to automatic review settings January 27, 2026 17:07
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 fixes a bug where customer SDK stats metric names were not displaying with the correct casing in Azure Monitor. The issue occurred because OpenTelemetry normalizes metric names to lowercase, but there was no mapping to restore the proper Pascal case (e.g., "Item_Success_Count") when exporting to Azure Monitor.

Changes:

  • Added a mapping dictionary to convert lowercase OpenTelemetry metric names to Pascal case display names for customer SDK stats
  • Updated the CustomerSdkStatsMetricName enum values to use lowercase names (matching what OpenTelemetry produces) instead of Pascal case
  • Applied the metric name mapping in the metrics exporter when processing customer SDK stats metrics

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/azure/monitor/opentelemetry/exporter/_constants.py Added metric name mapping dictionary and updated enum values to lowercase to match OpenTelemetry's normalization
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/metrics/_exporter.py Added import and logic to apply customer SDK stats metric name mapping when exporting metrics
sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md Added bug fix entry documenting the casing preservation fix

@rads-1996 rads-1996 merged commit 6e7a51b into Azure:main Jan 27, 2026
20 checks passed
@rads-1996 rads-1996 deleted the preserve-metric-names-casing branch January 27, 2026 17:41
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.

2 participants