Commit c607a7b
[AzureMonitorExporter] Subscribe Statsbeat MeterProvider to distro Network SDKStats meter (Azure#60209)
* [AzureMonitorExporter] Subscribe Statsbeat MeterProvider to distro Network SDKStats meter
The Microsoft.OpenTelemetry distro publishes Network SDKStats on a meter named
`MicrosoftOpenTelemetryNetworkSdkStatsMeter` when it runs with a non-Azure-Monitor
exporter (e.g. the Agent365 exporter), where the distro owns the network signal
instead of the exporter's Breeze transmitter.
This change:
- Adds `StatsbeatConstants.DistroNetworkSdkStatsMeterName` constant.
- Subscribes the Statsbeat MeterProvider in `AzureMonitorStatsbeat` to the new
meter via `.AddMeter(...)` alongside the existing Attach, Feature, and distro
Feature meters so distro-emitted Network stats flow through the existing
Statsbeat cadence.
This is the Network analog of Azure#59529 (distro Feature SDKStats meter).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* [AzureMonitorExporter] Add sentinel test for distro SDKStats meter subscriptions
Adds a regression test guarding the Statsbeat MeterProvider's .AddMeter(...) subscriptions to the distro-owned Feature and Network SDKStats meters. The test publishes an observable instrument on each distro meter and asserts ForceFlush collects it, failing if a .AddMeter(StatsbeatConstants.Distro*SdkStatsMeterName) entry is removed or a meter constant is renamed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent fbd3051 commit c607a7b
4 files changed
Lines changed: 56 additions & 0 deletions
File tree
- sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter
- src/Internals/Statsbeat
- tests/Azure.Monitor.OpenTelemetry.Exporter.Tests
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
153 | 163 | | |
154 | 164 | | |
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
110 | 153 | | |
111 | 154 | | |
0 commit comments