Package io.sentry.spring.jakarta
Annotation Interface EnableSentry
@Retention(RUNTIME)
@Import({SentryHubRegistrar.class,SentryInitBeanPostProcessor.class,SentryWebConfiguration.class})
@Target(TYPE)
public @interface EnableSentry
Enables Sentry error handling capabilities.
- creates bean of type
SentryOptions
- registers
IHub
for sending Sentry events - registers
SentryExceptionResolver
to send Sentry event for any uncaught exception in Spring MVC flow.
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe DSN tells the SDK where to send the events to.int
Determines whether all web exceptions are reported or only uncaught exceptions.Controls the size of the request body to extract if any.boolean
Whether to send personal identifiable information along with events.
-
Element Details
-
dsn
String dsnThe DSN tells the SDK where to send the events to. If this value is not provided, the SDK will just not send any events.- Returns:
- the Sentry DSN
- Default:
- ""
-
sendDefaultPii
boolean sendDefaultPiiWhether to send personal identifiable information along with events.- Returns:
- true if send default PII or false otherwise.
- Default:
- false
-
exceptionResolverOrder
int exceptionResolverOrderDetermines whether all web exceptions are reported or only uncaught exceptions.- Returns:
- the order to use for
SentryExceptionResolver
- Default:
- 1
-
maxRequestBodySize
SentryOptions.RequestSize maxRequestBodySizeControls the size of the request body to extract if any. No truncation is done by the SDK. If the request body is larger than the accepted size, nothing is sent.- Default:
- NONE
-