Skip to content

Customer SDKStats: Rename metric names and set the environment variable on by default#44849

Merged
rads-1996 merged 5 commits intoAzure:mainfrom
rads-1996:customer-sdk-stat-changes
Jan 26, 2026
Merged

Customer SDKStats: Rename metric names and set the environment variable on by default#44849
rads-1996 merged 5 commits intoAzure:mainfrom
rads-1996:customer-sdk-stat-changes

Conversation

@rads-1996
Copy link
Member

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

Description

Customer SDKStats: Rename metric names and set the environment variable on by default

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
Copy link
Member Author

Item_Success_Count -
Screenshot 2026-01-26 110908

Item_Dropped_Count -
Screenshot 2026-01-26 111938

Item_Retry_Count -
Screenshot 2026-01-26 115024

@rads-1996 rads-1996 force-pushed the customer-sdk-stat-changes branch from ede138b to c886a1f Compare January 26, 2026 20:38
@rads-1996 rads-1996 marked this pull request as ready for review January 26, 2026 21:10
Copilot AI review requested due to automatic review settings January 26, 2026 21:10
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 customer SDK stats feature to use a new environment variable convention (default-on via a ..._DISABLED flag) and renames the emitted metric names to their final, non-preview forms.

Changes:

  • Replace APPLICATIONINSIGHTS_SDKSTATS_ENABLED_PREVIEW with APPLICATIONINSIGHTS_SDKSTATS_DISABLED and change is_customer_sdkstats_enabled() semantics so customer SDK stats are enabled by default unless explicitly disabled.
  • Rename CustomerSdkStatsMetricName values from preview.item.*.count to Item_*_Count strings used when creating the observable gauges.
  • Update all affected tests (base exporter, customer sdkstats utilities/manager/core tests) and the CHANGELOG entry to match the new behavior and naming.

Reviewed changes

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

Show a summary per file
File Description
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_base_exporter.py Adjusts environment setup in base exporter tests to use APPLICATIONINSIGHTS_SDKSTATS_DISABLED and reflect the default-on behavior.
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_base_customer_sdkstats.py Switches customer SDK stats test setup/teardown to the new ..._DISABLED environment variable semantics.
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/customer_sdk_stats/test_utlities.py Updates imports, env var handling, and is_customer_sdkstats_enabled tests to align with the disabled-flag and default-enabled logic.
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/customer_sdk_stats/test_manager.py Uses the new ..._DISABLED flag in manager setup and disabled-path tests, ensuring manager status reflects the updated enable/disable semantics.
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/customer_sdk_stats/test_customer_sdkstats.py Updates core customer SDK stats tests to enable/disable via APPLICATIONINSIGHTS_SDKSTATS_DISABLED.
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/customer/_utils.py Changes is_customer_sdkstats_enabled() to read APPLICATIONINSIGHTS_SDKSTATS_DISABLED and default to enabled when unset.
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_constants.py Replaces the *_ENABLED_PREVIEW constant with *_DISABLED and updates CustomerSdkStatsMetricName values to new metric names.
sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md Documents the metric name rename and default-on behavior for customer SDK stats in the unreleased 1.0.0b47 section.

@rads-1996 rads-1996 merged commit 3e52f4c into Azure:main Jan 26, 2026
20 checks passed
@rads-1996 rads-1996 deleted the customer-sdk-stat-changes branch January 26, 2026 22:24
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