Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Bump: sentry-android to v4.3.0 (#343)
* Fix: Multiple FlutterError.onError calls in FlutterErrorIntegration (#345)
* Fix: Pass hint to EventProcessors (#356)
* Fix: EventProcessors were not dropping events when returning null (#353)

# 4.1.0-nullsafety.0
Expand Down
1 change: 1 addition & 0 deletions dart/lib/src/sentry_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class SentryClient {
preparedEvent = await _processEvent(
preparedEvent,
eventProcessors: _options.eventProcessors,
hint: hint,
);

// dropped by event processors
Expand Down
16 changes: 16 additions & 0 deletions dart/test/sentry_client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,22 @@ void main() {
expect(event.fingerprint!.contains('process'), true);
});

test('should pass hint to eventProcessors', () async {
final myHint = 'hint';
var executed = false;

options.addEventProcessor((event, {hint}) {
expect(myHint, hint);
executed = true;
return event;
});
final client = SentryClient(options);

await client.captureEvent(fakeEvent, hint: myHint);

expect(executed, true);
});

test('event processor drops the event', () async {
options.addEventProcessor(eventProcessorDropEvent);
final client = SentryClient(options);
Expand Down