Skip to content

Commit cd111b7

Browse files
authored
Merge ac9de10 into 540b466
2 parents 540b466 + ac9de10 commit cd111b7

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
- Send `http.request.method` in span data ([#2896](https://github.com/getsentry/sentry-java/pull/2896))
99
- Add `enablePrettySerializationOutput` option for opting out of pretty print ([#2871](https://github.com/getsentry/sentry-java/pull/2871))
1010

11+
### Fixes
12+
13+
- Add `sentry.enable-aot-compatibility` property to SpringBoot Jakarta `SentryAutoConfiguration` to enable building for GraalVM ([#2915](https://github.com/getsentry/sentry-java/pull/2915))
14+
1115
## 6.28.0
1216

1317
### Features

sentry-samples/sentry-samples-spring-boot-jakarta/src/main/resources/application.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ sentry.enable-tracing=true
1313
sentry.debug=true
1414
in-app-includes="io.sentry.samples"
1515

16+
# Uncomment and set to true to enable aot compatibility
17+
# This is 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
1722
spring.datasource.url=jdbc:p6spy:hsqldb:mem:testdb
1823
spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver

sentry-spring-boot-jakarta/src/main/java/io/sentry/spring/boot/jakarta/SentryAutoConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

sentry-spring-boot-jakarta/src/main/java/io/sentry/spring/boot/jakarta/SentryProperties.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public class SentryProperties extends SentryOptions {
3333
/** Reactive framework (e.g. WebFlux) integration properties */
3434
private @NotNull Reactive reactive = new Reactive();
3535

36+
private boolean enableAotCompatibility = false;
37+
3638
public boolean isUseGitCommitIdAsRelease() {
3739
return useGitCommitIdAsRelease;
3840
}
@@ -85,6 +87,14 @@ public void setReactive(@NotNull Reactive reactive) {
8587
this.reactive = reactive;
8688
}
8789

90+
public boolean isEnableAotCompatibility() {
91+
return enableAotCompatibility;
92+
}
93+
94+
public void setEnableAotCompatibility(boolean enableAotCompatibility) {
95+
this.enableAotCompatibility = enableAotCompatibility;
96+
}
97+
8898
@Open
8999
public static class Logging {
90100
/** Enable/Disable logging auto-configuration. */

0 commit comments

Comments
 (0)