Skip to content

Commit 5471724

Browse files
authored
[Monitor OpenTelemetry Exporter] Update Statsbeat to Count Success Upon Partially Successful Envelopes (#33741)
### Packages impacted by this PR @azure/monitor-opentelemetry-exporter ### Issues associated with this PR ### Describe the problem that is addressed by this PR Should adhere to the spec by counting a statsbeat success when some of the envelopes in a batch are accepted by breeze. ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary)
1 parent c502ad2 commit 5471724

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

sdk/monitor/monitor-opentelemetry-exporter/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 1.0.0-beta.31()
4+
5+
## Other Changes
6+
7+
- Hide iKey in debug logs.
8+
- Add to statsbeat success count when a batch of envelopes is partially accepted by breeze.
9+
310
## 1.0.0-beta.30 (2025-04-09)
411

512
### Features Added
@@ -12,7 +19,6 @@
1219
- Filter OpenTelemetry semantic attributes from being double recorded as custom dimensions.
1320
- Add support for detecting the Application Insights shim on internal verison.
1421
- Do not filter out `_MS.ProcessedByMetricExtractors` value on envelopes.
15-
- Hide iKey in debug logs.
1622

1723
## 1.0.0-beta.29 (2025-03-04)
1824

sdk/monitor/monitor-opentelemetry-exporter/src/platform/nodejs/baseSender.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ export abstract class BaseSender {
103103
diag.info(result);
104104
const breezeResponse = JSON.parse(result) as BreezeResponse;
105105
const filteredEnvelopes: Envelope[] = [];
106+
// If we have a partial success, count the succeeded envelopes
107+
if (breezeResponse.itemsReceived > 0) {
108+
this.networkStatsbeatMetrics?.countSuccess(duration);
109+
}
110+
// Figure out if we need to either retry or count failures
106111
if (breezeResponse.errors) {
107112
breezeResponse.errors.forEach((error) => {
108113
if (error.statusCode && isRetriable(error.statusCode)) {

0 commit comments

Comments
 (0)