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 @@ -7,6 +7,7 @@
- Add `CheckInUtils.withCheckIn` which abstracts away some of the manual check-ins complexity ([#2959](https://github.com/getsentry/sentry-java/pull/2959))
- Add `@SentryCaptureExceptionParameter` annotation which captures exceptions passed into an annotated method ([#2764](https://github.com/getsentry/sentry-java/pull/2764))
- This can be used to replace `Sentry.captureException` calls in `@ExceptionHandler` of a `@ControllerAdvice`
- Add `ServerWebExchange` to `Hint` for WebFlux as `WEBFLUX_EXCEPTION_HANDLER_EXCHANGE` ([#2977](https://github.com/getsentry/sentry-java/pull/2977))

## 6.30.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.sentry.spring.jakarta.webflux;

import static io.sentry.TypeCheckHint.WEBFLUX_EXCEPTION_HANDLER_EXCHANGE;
import static io.sentry.TypeCheckHint.WEBFLUX_EXCEPTION_HANDLER_REQUEST;
import static io.sentry.TypeCheckHint.WEBFLUX_EXCEPTION_HANDLER_RESPONSE;

Expand Down Expand Up @@ -58,6 +59,7 @@ public SentryWebExceptionHandler(final @NotNull IHub hub) {
hint.set(WEBFLUX_EXCEPTION_HANDLER_REQUEST, serverWebExchange.getRequest());
hint.set(
WEBFLUX_EXCEPTION_HANDLER_RESPONSE, serverWebExchange.getResponse());
hint.set(WEBFLUX_EXCEPTION_HANDLER_EXCHANGE, serverWebExchange);

hub.captureEvent(event, hint);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.sentry.spring.webflux;

import static io.sentry.TypeCheckHint.WEBFLUX_EXCEPTION_HANDLER_EXCHANGE;
import static io.sentry.TypeCheckHint.WEBFLUX_EXCEPTION_HANDLER_REQUEST;
import static io.sentry.TypeCheckHint.WEBFLUX_EXCEPTION_HANDLER_RESPONSE;

Expand Down Expand Up @@ -47,6 +48,7 @@ public SentryWebExceptionHandler(final @NotNull IHub hub) {
final Hint hint = new Hint();
hint.set(WEBFLUX_EXCEPTION_HANDLER_REQUEST, serverWebExchange.getRequest());
hint.set(WEBFLUX_EXCEPTION_HANDLER_RESPONSE, serverWebExchange.getResponse());
hint.set(WEBFLUX_EXCEPTION_HANDLER_EXCHANGE, serverWebExchange);

hub.captureEvent(event, hint);
}
Expand Down
1 change: 1 addition & 0 deletions sentry/api/sentry.api
Original file line number Diff line number Diff line change
Expand Up @@ -2594,6 +2594,7 @@ public final class io/sentry/TypeCheckHint {
public static final field SPRING_REQUEST_INTERCEPTOR_RESPONSE Ljava/lang/String;
public static final field SPRING_RESOLVER_REQUEST Ljava/lang/String;
public static final field SPRING_RESOLVER_RESPONSE Ljava/lang/String;
public static final field WEBFLUX_EXCEPTION_HANDLER_EXCHANGE Ljava/lang/String;
public static final field WEBFLUX_EXCEPTION_HANDLER_REQUEST Ljava/lang/String;
public static final field WEBFLUX_EXCEPTION_HANDLER_RESPONSE Ljava/lang/String;
public static final field WEBFLUX_FILTER_REQUEST Ljava/lang/String;
Expand Down
3 changes: 3 additions & 0 deletions sentry/src/main/java/io/sentry/TypeCheckHint.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public final class TypeCheckHint {
"webFluxExceptionHandler:response";
/** Used for Spring WebFlux exception handler. */
public static final String WEBFLUX_EXCEPTION_HANDLER_REQUEST = "webFluxExceptionHandler:request";
/** Used for Spring WebFlux exception handler. */
public static final String WEBFLUX_EXCEPTION_HANDLER_EXCHANGE =
"webFluxExceptionHandler:exchange";

/** Used for Spring WebFlux filter breadcrumbs. */
public static final String WEBFLUX_FILTER_RESPONSE = "webFluxFilter:response";
Expand Down