Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Next Next commit
apply scope to event
  • Loading branch information
Manoel Aranda Neto committed Oct 25, 2019
commit 2356d64da37fda1c6dd54dbf199cef6ed2a11196
9 changes: 9 additions & 0 deletions sentry-core/src/main/java/io/sentry/core/SentryClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ public SentryId captureEvent(SentryEvent event, @Nullable Scope scope) {
event.setEnvironment(options.getEnvironment());
}

if (scope != null) {
event.setTransaction(scope.getTransaction());
event.setUser(scope.getUser());
event.setFingerprint(scope.getFingerprint());
event.setBreadcrumbs(scope.getBreadcrumbs());
event.setTags(scope.getTags());
event.setExtra(scope.getExtra());
}

for (EventProcessor processor : options.getEventProcessors()) {
processor.process(event);
}
Expand Down
6 changes: 3 additions & 3 deletions sentry-core/src/main/java/io/sentry/core/SentryEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,23 @@ public List<Breadcrumb> getBreadcrumbs() {
return breadcrumbs;
}

public void setBreadcrumbs(ArrayList<Breadcrumb> breadcrumbs) {
public void setBreadcrumbs(List<Breadcrumb> breadcrumbs) {
this.breadcrumbs = breadcrumbs;
}

public Map<String, String> getTags() {
return tags;
}

public void setTags(HashMap<String, String> tags) {
public void setTags(Map<String, String> tags) {
this.tags = tags;
}

public Map<String, Object> getExtra() {
return extra;
}

public void setExtra(HashMap<String, Object> extra) {
public void setExtra(Map<String, Object> extra) {
this.extra = extra;
}

Expand Down