Skip to content

[Exporter] Update config manager to latest spec#47949

Open
lzchen wants to merge 10 commits into
Azure:mainfrom
lzchen:onesettings
Open

[Exporter] Update config manager to latest spec#47949
lzchen wants to merge 10 commits into
Azure:mainfrom
lzchen:onesettings

Conversation

@lzchen

@lzchen lzchen commented Jul 8, 2026

Copy link
Copy Markdown
Member
  • Remove CHANGE_VERSION and simply compares etag for change endpoint in onesettings
  • Change all logger statements to debug to reduce noise

Copilot AI review requested due to automatic review settings July 8, 2026 16:29
@github-actions github-actions Bot added the Monitor - Exporter Monitor OpenTelemetry Exporter label Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Azure Monitor OpenTelemetry Exporter's OneSettings configuration manager to align with the latest spec. It replaces the previous CHANGE_VERSION-based change-detection mechanism with an ETag/If-None-Match conditional-request model: the CHANGE endpoint (e2) is polled with the cached ETag, and a 200 (new or absent ETag) triggers a CONFIG endpoint (e1) fetch, while 304 Not Modified skips it. It also demotes all OneSettings log statements from warning to debug to reduce noise for users behind firewalls. Since the config manager is still gated behind commented-out initialization in _base.py, this feature is not yet active at runtime.

Changes:

  • Remove version tracking (version, version_cache, _ONE_SETTINGS_CHANGE_VERSION_KEY, get_current_version) and switch change detection to ETag comparison.
  • Change OneSettings logging from warning to debug and drop the now-unnecessary do-not-log-exceptions-if-not-debug pylint suppressions.
  • Update unit tests and CHANGELOG to reflect the new ETag-based flow.

Reviewed changes

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

Show a summary per file
File Description
azure/.../_configuration/__init__.py Rewrites get_configuration_and_refresh_interval to ETag-based flow; removes version_cache and get_current_version.
azure/.../_configuration/_utils.py Removes version from OneSettingsResponse and version parsing; logging moved to debug.
azure/.../_configuration/_worker.py Refresh-loop failure logging moved to debug.
azure/.../_constants.py Removes _ONE_SETTINGS_CHANGE_VERSION_KEY.
azure/.../export/_base.py Comment-only reindentation of the (still commented-out) initialize call.
azure/.../_utils.py Comment-only wording update (statsbeatsdkstats).
tests/configuration/test_manager.py Rewrites version-based tests to ETag-based; updates log-level assertions.
tests/configuration/test_utils.py Drops version assertions and _ONE_SETTINGS_CHANGE_VERSION_KEY usage.
tests/configuration/test_worker.py Updates assertion to check debug instead of warning.
CHANGELOG.md Documents the ETag-based change detection and log-level change under Other Changes.

@rads-1996 rads-1996 left a comment

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.

LGTM

lzchen and others added 2 commits July 8, 2026 14:46
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lzchen lzchen enabled auto-merge (squash) July 8, 2026 22:02
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