Skip to content

Commit

Permalink
Merge fb6376c into 3cda41b
Browse files Browse the repository at this point in the history
  • Loading branch information
lbloder committed Sep 12, 2023
2 parents 3cda41b + fb6376c commit 770bd4a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- Add `sentry.enable-aot-compatibility` property to SpringBoot Jakarta `SentryAutoConfiguration` to enable building for GraalVM ([#2915](https://github.com/getsentry/sentry-java/pull/2915))

### Dependencies

- Bump Gradle from v8.2.1 to v8.3.0 ([#2900](https://github.com/getsentry/sentry-java/pull/2900))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ sentry.enable-tracing=true
sentry.debug=true
in-app-includes="io.sentry.samples"

# Uncomment and set to true to enable aot compatibility
# This flag disables all AOP related features (i.e. @SentryTransaction, @SentrySpan)
# to successfully compile to GraalVM
# sentry.enable-aot-compatibility=false

# Database configuration
spring.datasource.url=jdbc:p6spy:hsqldb:mem:testdb
spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver
Expand Down
2 changes: 2 additions & 0 deletions sentry-spring-boot-jakarta/api/sentry-spring-boot-jakarta.api
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public class io/sentry/spring/boot/jakarta/SentryProperties : io/sentry/SentryOp
public fun getLogging ()Lio/sentry/spring/boot/jakarta/SentryProperties$Logging;
public fun getReactive ()Lio/sentry/spring/boot/jakarta/SentryProperties$Reactive;
public fun getUserFilterOrder ()Ljava/lang/Integer;
public fun isEnableAotCompatibility ()Z
public fun isUseGitCommitIdAsRelease ()Z
public fun setEnableAotCompatibility (Z)V
public fun setExceptionResolverOrder (I)V
public fun setLogging (Lio/sentry/spring/boot/jakarta/SentryProperties$Logging;)V
public fun setReactive (Lio/sentry/spring/boot/jakarta/SentryProperties$Reactive;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ public FilterRegistrationBean<SentryTracingFilter> sentryTracingFilter(
}

@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(
value = "sentry.enable-aot-compatibility",
havingValue = "false",
matchIfMissing = true)
@Conditional(SentryTracingCondition.class)
@ConditionalOnClass(ProceedingJoinPoint.class)
@Import(SentryAdviceConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ public class SentryProperties extends SentryOptions {
/** Reactive framework (e.g. WebFlux) integration properties */
private @NotNull Reactive reactive = new Reactive();

/**
* If set to true, this flag disables all AOP related features (e.g. {@link
* io.sentry.spring.jakarta.tracing.SentryTransaction}, {@link
* io.sentry.spring.jakarta.tracing.SentrySpan}) to successfully compile to GraalVM
*/
private boolean enableAotCompatibility = false;

public boolean isUseGitCommitIdAsRelease() {
return useGitCommitIdAsRelease;
}
Expand Down Expand Up @@ -85,6 +92,14 @@ public void setReactive(@NotNull Reactive reactive) {
this.reactive = reactive;
}

public boolean isEnableAotCompatibility() {
return enableAotCompatibility;
}

public void setEnableAotCompatibility(boolean enableAotCompatibility) {
this.enableAotCompatibility = enableAotCompatibility;
}

@Open
public static class Logging {
/** Enable/Disable logging auto-configuration. */
Expand Down

0 comments on commit 770bd4a

Please sign in to comment.