Skip to content

Fix customer SDK stats metrics to display drop code and retry code enum values without the prefix#44852

Merged
rads-1996 merged 4 commits intoAzure:mainfrom
rads-1996:fix-dropcode-naming
Jan 27, 2026
Merged

Fix customer SDK stats metrics to display drop code and retry code enum values without the prefix#44852
rads-1996 merged 4 commits intoAzure:mainfrom
rads-1996:fix-dropcode-naming

Conversation

@rads-1996
Copy link
Member

Description

Fix the dropcode and retrycode naming. Only shows the actual dropcode and retrycode without the prefix.

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 26, 2026
@rads-1996 rads-1996 changed the title Fix the dropcode and retrycode naming Fix customer SDK stats metrics to display drop code and retry code enum values without the prefix Jan 26, 2026
@rads-1996
Copy link
Member Author

Dropped Count -
Screenshot 2026-01-26 142857

Retry Count -
Screenshot 2026-01-26 142922

@rads-1996 rads-1996 marked this pull request as ready for review January 26, 2026 23:43
Copilot AI review requested due to automatic review settings January 26, 2026 23:43
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 the display format of drop code and retry code enum values in customer SDK stats metrics by ensuring that only the string value (e.g., "CLIENT_READONLY") is used in metrics attributes, rather than the full enum representation.

Changes:

  • Modified _item_drop_callback to use .value on DropCode enums when setting the "drop.code" attribute
  • Modified _item_retry_callback to use .value on RetryCode enums when setting the "retry.code" attribute
  • Updated CHANGELOG with bug fix entry

Reviewed changes

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

File Description
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/customer/_manager.py Added conditional logic to extract string values from enum types for drop and retry codes
sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md Documented the bug fix in the unreleased version section

@rads-1996 rads-1996 force-pushed the fix-dropcode-naming branch from c8f5364 to 5516755 Compare January 27, 2026 00:46
@rads-1996 rads-1996 merged commit 673caa3 into Azure:main Jan 27, 2026
20 checks passed
@rads-1996 rads-1996 deleted the fix-dropcode-naming branch January 27, 2026 01:13
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