Skip to content

Pass metrics observations to upstream SDKStats Manager#191

Open
rads-1996 wants to merge 3 commits into
microsoft:mainfrom
rads-1996:use-sdkstats-manager-utils
Open

Pass metrics observations to upstream SDKStats Manager#191
rads-1996 wants to merge 3 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 34,395.0 35,195.2 -2.27%
azure_monitor_span yes 147,710.5 162,628.1 -9.17%
otel_log no 41,259.2 42,744.2 -3.47%
otel_span no 41,743.2 43,775.2 -4.64%

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
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.

2 participants