Skip to content
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixes

- Fix typos in Spring GraphQL integration names (`GrahQL` to `GraphQL`)
- Fix misleading IScopeObserver.setBreadcrumbs method name to clearBreadcrumbs ([#5844](https://github.com/getsentry/sentry-java/pull/6077))
- Update `SentryTraced` so that it now honors `options.setIgnoredSpanOrigins` ([#6058](https://github.com/getsentry/sentry-java/pull/6058))
- `SentryTraced` now checks for its owning transaction dynamically rather than once per app process. The latter caused `SentryTraced` spans to be dropped process-wide once the original transaction finished ([#6057](https://github.com/getsentry/sentry-java/pull/6057))
- Fix typos in Spring GraphQL integration names (`GrahQL` to `GraphQL`) ([#6061](https://github.com/getsentry/sentry-java/pull/6061))
Expand Down
2 changes: 2 additions & 0 deletions sentry/src/main/java/io/sentry/IScopeObserver.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public interface IScopeObserver {

void addBreadcrumb(@NotNull Breadcrumb crumb);

void clearBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs);
Comment thread
cursor[bot] marked this conversation as resolved.
@Deprecated
void setBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs);

Comment thread
nihal1407 marked this conversation as resolved.
void setTag(@NotNull String key, @NotNull String value);
Expand Down
4 changes: 2 additions & 2 deletions sentry/src/main/java/io/sentry/Scope.java
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public void addBreadcrumb(@NotNull Breadcrumb breadcrumb, @Nullable Hint hint) {

for (final IScopeObserver observer : options.getScopeObservers()) {
observer.addBreadcrumb(breadcrumb);
observer.setBreadcrumbs(breadcrumbs);
observer.clearBreadcrumbs(breadcrumbs);
Comment thread
nihal1407 marked this conversation as resolved.
}
} else {
options.getLogger().log(SentryLevel.INFO, "Breadcrumb was dropped by beforeBreadcrumb");
Expand All @@ -534,7 +534,7 @@ public void clearBreadcrumbs() {
breadcrumbs.clear();

for (final IScopeObserver observer : options.getScopeObservers()) {
observer.setBreadcrumbs(breadcrumbs);
observer.clearBreadcrumbs(breadcrumbs);
}
}

Expand Down
2 changes: 1 addition & 1 deletion sentry/src/main/java/io/sentry/ScopeObserverAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void setUser(@Nullable User user) {}
public void addBreadcrumb(@NotNull Breadcrumb crumb) {}

@Override
public void setBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs) {}
public void clearBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs) {}

@Override
public void setTag(@NotNull String key, @NotNull String value) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void addBreadcrumb(@NotNull Breadcrumb crumb) {
}

@Override
public void setBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs) {
public void clearBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs) {
if (breadcrumbs.isEmpty()) {
// we only clear the queue if the new collection is empty (someone called clearBreadcrumbs)
// If it's not empty, we'd add breadcrumbs one-by-one in the method above
Expand Down