Skip to content

Track live metrics disabling in feature sdkstats (exporter)#47297

Open
rads-1996 wants to merge 4 commits into
Azure:mainfrom
rads-1996:track-disable-live-metrics-exporter
Open

Track live metrics disabling in feature sdkstats (exporter)#47297
rads-1996 wants to merge 4 commits into
Azure:mainfrom
rads-1996:track-disable-live-metrics-exporter

Conversation

@rads-1996
Copy link
Copy Markdown
Member

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

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 June 2, 2026 22:02
@github-actions github-actions Bot added the Monitor - Exporter Monitor OpenTelemetry Exporter label Jun 2, 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

This PR updates live metrics feature tracking so that Statsbeat “live metrics” feature usage is recorded only when live metrics is explicitly disabled via the local configuration callback, rather than when enable_live_metrics() is called.

Changes:

  • Remove Statsbeat live-metrics feature tracking from the enable_live_metrics() code path.
  • Add Statsbeat tracking when get_quickpulse_configuration_callback() evaluates live metrics as explicitly disabled (including when Quickpulse is already off).
  • Update/extend unit tests to validate the new tracking behavior and update the changelog.

Reviewed changes

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

File Description
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_live_metrics.py Moves Statsbeat live-metrics feature tracking from enable-time to config-disable-time within the configuration callback.
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/quickpulse/test_live_metrics.py Updates existing tests to assert Statsbeat is not tracked on enable, and adds callback-focused tests for disable tracking.
sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md Adds an unreleased entry describing the change.

Comment thread sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md
@rads-1996 rads-1996 changed the title Track live metrics disabling in feature sdkstats Track live metrics disabling in feature sdkstats (exporter) Jun 2, 2026
)
elif live_metrics_enabled is False and manager.is_initialized():
# Track explicit live metrics disable for statsbeat feature reporting.
set_statsbeat_live_metrics_feature_set()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Can we add a comment or in the CHANGELOG the release date for when live metrics feature bit meaning switches to the opposite?

@rads-1996 rads-1996 force-pushed the track-disable-live-metrics-exporter branch from ba9dec8 to c92600a Compare June 3, 2026 16:35
@rads-1996 rads-1996 force-pushed the track-disable-live-metrics-exporter branch from 0d4900e to b482b00 Compare June 3, 2026 17:21
@rads-1996 rads-1996 force-pushed the track-disable-live-metrics-exporter branch from b482b00 to a2979f2 Compare June 3, 2026 17:50
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.

4 participants