File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11# Unreleased
22
3+ * Fix: captureTransaction should return emptyId when transaction is discarded (#713 )
4+
35# 6.3.0-beta.3
46
57* Feat: Auto transactions duration trimming (#702 )
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ class SentryClient {
261261
262262 final id = await captureEnvelope (
263263 SentryEnvelope .fromTransaction (preparedTransaction, _options.sdk));
264- return id! ;
264+ return id ?? SentryId . empty () ;
265265 }
266266
267267 /// Reports the [envelope] to Sentry.io.
Original file line number Diff line number Diff line change @@ -346,6 +346,14 @@ void main() {
346346
347347 expect (capturedEvent['exception' ], isNull);
348348 });
349+
350+ test ('should return empty for when transaction is discarded' , () async {
351+ final client = fixture.getSut (eventProcessor: DropAllEventProcessor ());
352+ final tr = SentryTransaction (fixture.tracer);
353+ final id = await client.captureTransaction (tr);
354+
355+ expect (id, SentryId .empty ());
356+ });
349357 });
350358
351359 group ('SentryClient : apply scope to the captured event' , () {
You can’t perform that action at this time.
0 commit comments