Skip to content

Pass metrics observations to upstream SDKStats Manager#191

Merged
rads-1996 merged 12 commits into
microsoft:mainfrom
rads-1996:use-sdkstats-manager-utils
Jul 1, 2026
Merged

Pass metrics observations to upstream SDKStats Manager#191
rads-1996 merged 12 commits into
microsoft:mainfrom
rads-1996:use-sdkstats-manager-utils

Conversation

@rads-1996

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2026 16:15
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Performance comparison

Threshold: regressions >15.0% on gating scenarios fail the build. Higher ops/s is better; positive Δ means the PR is slower.

Scenario Gating Baseline (ops/s) Candidate (ops/s) Δ % Status
azure_monitor_log yes 21,468.9 21,702.8 -1.08%
azure_monitor_span yes 159,744.4 163,292.0 -2.17%
otel_log no 25,512.2 25,469.3 +0.17%
otel_span no 47,494.7 46,996.9 +1.06%

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 distro’s SDKStats “network” metric integration so that OTLP/Agent365 request-success counts are contributed to the upstream Azure Monitor Statsbeat metric stream via StatsbeatManager.add_metric_callback, rather than by mutating upstream observable gauge callback lists directly.

Changes:

  • Refactors network SDKStats integration to register an additional observation callback through StatsbeatManager.add_metric_callback.
  • Updates module documentation/wording to reflect “observations” rather than “gauges”.
  • Removes the prior thread-safe idempotency guard and test reset helper (impacting existing test expectations).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/microsoft/opentelemetry/_sdkstats/_network_metrics.py Outdated
@rads-1996 rads-1996 force-pushed the use-sdkstats-manager-utils branch from e0629ef to 513da2a Compare June 12, 2026 20:18
@rads-1996 rads-1996 force-pushed the use-sdkstats-manager-utils branch from cd86cea to eb33258 Compare June 18, 2026 15:33
@rads-1996 rads-1996 force-pushed the use-sdkstats-manager-utils branch from 8583e4f to 8b6ca5e Compare June 30, 2026 20:58
@rads-1996 rads-1996 force-pushed the use-sdkstats-manager-utils branch from 8b6ca5e to 55714f4 Compare July 1, 2026 15:48
@rads-1996 rads-1996 merged commit 8140281 into microsoft:main Jul 1, 2026
11 checks passed
@rads-1996 rads-1996 mentioned this pull request Jul 1, 2026
@rads-1996 rads-1996 deleted the use-sdkstats-manager-utils branch July 1, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants