File tree Expand file tree Collapse file tree 5 files changed +27
-0
lines changed
sentry-samples/sentry-samples-spring-boot-jakarta/src/main/resources
sentry-spring-boot-jakarta
src/main/java/io/sentry/spring/boot/jakarta Expand file tree Collapse file tree 5 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1111
1212- Always send memory stats for transactions ([ #2936 ] ( https://github.com/getsentry/sentry-java/pull/2936 ) )
1313 - This makes it possible to query transactions by the ` device.class ` tag on Sentry
14+ - Add ` sentry.enable-aot-compatibility ` property to SpringBoot Jakarta ` SentryAutoConfiguration ` to enable building for GraalVM ([ #2915 ] ( https://github.com/getsentry/sentry-java/pull/2915 ) )
1415
1516### Dependencies
1617
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ sentry.enable-tracing=true
1313sentry.debug =true
1414in-app-includes ="io.sentry.samples"
1515
16+ # Uncomment and set to true to enable aot compatibility
17+ # This flag disables all AOP related features (i.e. @SentryTransaction, @SentrySpan)
18+ # to successfully compile to GraalVM
19+ # sentry.enable-aot-compatibility=false
20+
1621# Database configuration
1722spring.datasource.url =jdbc:p6spy:hsqldb:mem:testdb
1823spring.datasource.driver-class-name =com.p6spy.engine.spy.P6SpyDriver
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ public class io/sentry/spring/boot/jakarta/SentryProperties : io/sentry/SentryOp
2424 public fun getLogging ()Lio/sentry/spring/boot/jakarta/SentryProperties$Logging;
2525 public fun getReactive ()Lio/sentry/spring/boot/jakarta/SentryProperties$Reactive;
2626 public fun getUserFilterOrder ()Ljava/lang/Integer;
27+ public fun isEnableAotCompatibility ()Z
2728 public fun isUseGitCommitIdAsRelease ()Z
29+ public fun setEnableAotCompatibility (Z)V
2830 public fun setExceptionResolverOrder (I)V
2931 public fun setLogging (Lio/sentry/spring/boot/jakarta/SentryProperties$Logging;)V
3032 public fun setReactive (Lio/sentry/spring/boot/jakarta/SentryProperties$Reactive;)V
Original file line number Diff line number Diff line change @@ -273,6 +273,10 @@ public FilterRegistrationBean<SentryTracingFilter> sentryTracingFilter(
273273 }
274274
275275 @ Configuration (proxyBeanMethods = false )
276+ @ ConditionalOnProperty (
277+ value = "sentry.enable-aot-compatibility" ,
278+ havingValue = "false" ,
279+ matchIfMissing = true )
276280 @ Conditional (SentryTracingCondition .class )
277281 @ ConditionalOnClass (ProceedingJoinPoint .class )
278282 @ Import (SentryAdviceConfiguration .class )
Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ public class SentryProperties extends SentryOptions {
3333 /** Reactive framework (e.g. WebFlux) integration properties */
3434 private @ NotNull Reactive reactive = new Reactive ();
3535
36+ /**
37+ * If set to true, this flag disables all AOP related features (e.g. {@link
38+ * io.sentry.spring.jakarta.tracing.SentryTransaction}, {@link
39+ * io.sentry.spring.jakarta.tracing.SentrySpan}) to successfully compile to GraalVM
40+ */
41+ private boolean enableAotCompatibility = false ;
42+
3643 public boolean isUseGitCommitIdAsRelease () {
3744 return useGitCommitIdAsRelease ;
3845 }
@@ -85,6 +92,14 @@ public void setReactive(@NotNull Reactive reactive) {
8592 this .reactive = reactive ;
8693 }
8794
95+ public boolean isEnableAotCompatibility () {
96+ return enableAotCompatibility ;
97+ }
98+
99+ public void setEnableAotCompatibility (boolean enableAotCompatibility ) {
100+ this .enableAotCompatibility = enableAotCompatibility ;
101+ }
102+
88103 @ Open
89104 public static class Logging {
90105 /** Enable/Disable logging auto-configuration. */
You can’t perform that action at this time.
0 commit comments