Skip to content
Prev Previous commit
Next Next commit
doc
  • Loading branch information
rxlabz committed Oct 27, 2020
commit 4b7972262c00a7e34143c569880fbe18e1766ebc
6 changes: 5 additions & 1 deletion dart/lib/src/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,16 @@ class Scope {
event = event.copyWith(breadcrumbs: breadcrumbs);
}

// Merge the scope tags.
// Merge the scope tags
// if the scope and the event have tag entries with the same key,
// the event tags will be keeped
event = event.copyWith(
tags: tags.map((key, value) => MapEntry(key, value))
..addAll(event.tags ?? {}));

// Merge the scope extra.
// if the scope and the event have extra entries with the same key,
// the event extra will be keeped
event = event.copyWith(
extra: extra.map((key, value) => MapEntry(key, value))
..addAll(event.extra ?? {}));
Expand Down