Track live metrics disabling in feature sdkstats (exporter)#47297
Open
rads-1996 wants to merge 4 commits into
Open
Track live metrics disabling in feature sdkstats (exporter)#47297rads-1996 wants to merge 4 commits into
rads-1996 wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
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. |
lzchen
reviewed
Jun 3, 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() |
Member
There was a problem hiding this comment.
Nit: Can we add a comment or in the CHANGELOG the release date for when live metrics feature bit meaning switches to the opposite?
lzchen
approved these changes
Jun 3, 2026
ba9dec8 to
c92600a
Compare
JacksonWeber
approved these changes
Jun 3, 2026
0d4900e to
b482b00
Compare
b482b00 to
a2979f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
General Guidelines and Best Practices
Testing Guidelines