File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ * Fix: captureTransaction should return emptyId when transaction is discarded (#713 )
4
+
3
5
# 6.3.0-beta.3
4
6
5
7
* Feat: Auto transactions duration trimming (#702 )
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ class SentryClient {
261
261
262
262
final id = await captureEnvelope (
263
263
SentryEnvelope .fromTransaction (preparedTransaction, _options.sdk));
264
- return id! ;
264
+ return id ?? SentryId . empty () ;
265
265
}
266
266
267
267
/// Reports the [envelope] to Sentry.io.
Original file line number Diff line number Diff line change @@ -346,6 +346,14 @@ void main() {
346
346
347
347
expect (capturedEvent['exception' ], isNull);
348
348
});
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
+ });
349
357
});
350
358
351
359
group ('SentryClient : apply scope to the captured event' , () {
You can’t perform that action at this time.
0 commit comments