You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: suppress APM error events for receive-loop cancellations during shutdown (5.7.5)
Setting Outcome=Success (5.7.4) was insufficient: Elastic APM captures error
events at the DiagnosticSource level before ReceiverWrapper runs, so the error
document was already queued regardless of the outcome override.
Registers a one-time Agent.AddFilter(IError) that drops error events whose
TransactionId matches a cancelled-receive transaction, preventing them from
reaching the APM server.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
## 5.7.5
8
+
- Fixed
9
+
-`ApmTransactionManager.OnReceiveCancelled()` now also suppresses the APM error *event* (not just the transaction outcome) for receive-loop cancellations during pod shutdown. Setting `Outcome = Success` (5.7.4) was insufficient because Elastic APM captures error events at the `DiagnosticSource` level — before `ReceiverWrapper` runs — so the error document was already queued. 5.7.5 registers a one-time `Agent.AddFilter(IError)` filter that drops error events whose `TransactionId` belongs to a cancelled receive transaction, preventing them from reaching the APM server.
10
+
7
11
## 5.7.4
8
12
- Fixed
9
13
- Prevented `OperationCanceledException` during pod graceful shutdown from being recorded as APM errors. Added `ICancellationAwareTransactionManager` — an optional interface that `ITransactionManager` implementations can implement to react to receive-loop cancellations. `ApmTransactionManager` implements it by setting the current Elastic APM transaction outcome to `Success`, overriding the error state set by the Azure SDK's auto-instrumentation. `ReceiverWrapper` calls `OnReceiveCancelled()` via a runtime cast before logging the shutdown warning.
0 commit comments