-
-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add autoconfigure modules for Spring Boot called
sentry-spring-boot
…
… and `sentry-spring-boot-jakarta` (#2880) * Move sentry-spring-boot-starter to sentry-spring-boot module and have sentry-spring-boot-starter bring spring-boot-starter * Changelog * Improve changelog
- Loading branch information
Showing
54 changed files
with
354 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
57 changes: 57 additions & 0 deletions
57
sentry-spring-boot-jakarta/api/sentry-spring-boot-jakarta.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
public final class io/sentry/spring/boot/jakarta/BuildConfig { | ||
public static final field SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME Ljava/lang/String; | ||
public static final field VERSION_NAME Ljava/lang/String; | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/InAppIncludesResolver : org/springframework/context/ApplicationContextAware { | ||
public fun <init> ()V | ||
public fun resolveInAppIncludes ()Ljava/util/List; | ||
public fun setApplicationContext (Lorg/springframework/context/ApplicationContext;)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryAutoConfiguration { | ||
public fun <init> ()V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryLogbackAppenderAutoConfiguration { | ||
public fun <init> ()V | ||
public fun sentryLogbackInitializer (Lio/sentry/spring/boot/jakarta/SentryProperties;)Lio/sentry/spring/boot/jakarta/SentryLogbackInitializer; | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryProperties : io/sentry/SentryOptions { | ||
public fun <init> ()V | ||
public fun getExceptionResolverOrder ()I | ||
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 isUseGitCommitIdAsRelease ()Z | ||
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 | ||
public fun setUseGitCommitIdAsRelease (Z)V | ||
public fun setUserFilterOrder (Ljava/lang/Integer;)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryProperties$Logging { | ||
public fun <init> ()V | ||
public fun getLoggers ()Ljava/util/List; | ||
public fun getMinimumBreadcrumbLevel ()Lorg/slf4j/event/Level; | ||
public fun getMinimumEventLevel ()Lorg/slf4j/event/Level; | ||
public fun isEnabled ()Z | ||
public fun setEnabled (Z)V | ||
public fun setLoggers (Ljava/util/List;)V | ||
public fun setMinimumBreadcrumbLevel (Lorg/slf4j/event/Level;)V | ||
public fun setMinimumEventLevel (Lorg/slf4j/event/Level;)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryProperties$Reactive { | ||
public fun <init> ()V | ||
public fun isThreadLocalAccessorEnabled ()Z | ||
public fun setThreadLocalAccessorEnabled (Z)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryWebfluxAutoConfiguration { | ||
public fun <init> ()V | ||
public fun sentryWebExceptionHandler (Lio/sentry/IHub;)Lio/sentry/spring/jakarta/webflux/SentryWebExceptionHandler; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import net.ltgt.gradle.errorprone.errorprone | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
import org.springframework.boot.gradle.plugin.SpringBootPlugin | ||
|
||
plugins { | ||
`java-library` | ||
kotlin("jvm") | ||
jacoco | ||
id(Config.QualityPlugins.errorProne) | ||
id(Config.QualityPlugins.gradleVersions) | ||
id(Config.BuildPlugins.buildConfig) version Config.BuildPlugins.buildConfigVersion | ||
id(Config.BuildPlugins.springBoot) version Config.springBoot3Version apply false | ||
} | ||
|
||
configure<JavaPluginExtension> { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
tasks.withType<KotlinCompile>().configureEach { | ||
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() | ||
kotlinOptions.languageVersion = Config.kotlinCompatibleLanguageVersion | ||
} | ||
|
||
dependencies { | ||
api(projects.sentry) | ||
api(projects.sentrySpringJakarta) | ||
compileOnly(projects.sentryLogback) | ||
compileOnly(projects.sentryApacheHttpClient5) | ||
compileOnly(Config.Libs.springBoot3Starter) | ||
compileOnly(platform(SpringBootPlugin.BOM_COORDINATES)) | ||
compileOnly(projects.sentryGraphql) | ||
compileOnly(Config.Libs.springWeb) | ||
compileOnly(Config.Libs.springWebflux) | ||
compileOnly(Config.Libs.servletApiJakarta) | ||
compileOnly(Config.Libs.springBoot3StarterAop) | ||
compileOnly(Config.Libs.springBoot3StarterSecurity) | ||
compileOnly(Config.Libs.springBoot3StarterGraphql) | ||
compileOnly(Config.Libs.reactorCore) | ||
compileOnly(Config.Libs.contextPropagation) | ||
compileOnly(projects.sentryOpentelemetry.sentryOpentelemetryCore) | ||
|
||
annotationProcessor(platform(SpringBootPlugin.BOM_COORDINATES)) | ||
annotationProcessor(Config.AnnotationProcessors.springBootAutoConfigure) | ||
annotationProcessor(Config.AnnotationProcessors.springBootConfiguration) | ||
|
||
compileOnly(Config.CompileOnly.nopen) | ||
errorprone(Config.CompileOnly.nopenChecker) | ||
errorprone(Config.CompileOnly.errorprone) | ||
errorprone(Config.CompileOnly.errorProneNullAway) | ||
compileOnly(Config.CompileOnly.jetbrainsAnnotations) | ||
|
||
// tests | ||
testImplementation(projects.sentryLogback) | ||
testImplementation(projects.sentryApacheHttpClient5) | ||
testImplementation(projects.sentryTestSupport) | ||
testImplementation(kotlin(Config.kotlinStdLib)) | ||
testImplementation(Config.TestLibs.kotlinTestJunit) | ||
testImplementation(Config.TestLibs.mockitoKotlin) | ||
testImplementation(Config.TestLibs.mockWebserver) | ||
|
||
testImplementation(Config.Libs.okhttp) | ||
testImplementation(Config.Libs.springBoot3Starter) | ||
testImplementation(platform(SpringBootPlugin.BOM_COORDINATES)) | ||
testImplementation(Config.Libs.springBoot3StarterTest) | ||
testImplementation(Config.Libs.springBoot3StarterWeb) | ||
testImplementation(Config.Libs.springBoot3StarterWebflux) | ||
testImplementation(Config.Libs.springBoot3StarterSecurity) | ||
testImplementation(Config.Libs.springBoot3StarterAop) | ||
testImplementation(projects.sentryOpentelemetry.sentryOpentelemetryCore) | ||
testImplementation(Config.Libs.contextPropagation) | ||
} | ||
|
||
configure<SourceSetContainer> { | ||
test { | ||
java.srcDir("src/test/java") | ||
} | ||
} | ||
|
||
jacoco { | ||
toolVersion = Config.QualityPlugins.Jacoco.version | ||
} | ||
|
||
tasks.jacocoTestReport { | ||
reports { | ||
xml.required.set(true) | ||
html.required.set(false) | ||
} | ||
} | ||
|
||
tasks { | ||
jacocoTestCoverageVerification { | ||
violationRules { | ||
rule { limit { minimum = Config.QualityPlugins.Jacoco.minimumCoverage } } | ||
} | ||
} | ||
check { | ||
dependsOn(jacocoTestCoverageVerification) | ||
dependsOn(jacocoTestReport) | ||
} | ||
} | ||
|
||
buildConfig { | ||
useJavaOutput() | ||
packageName("io.sentry.spring.boot.jakarta") | ||
buildConfigField("String", "SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME", "\"${Config.Sentry.SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME}\"") | ||
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"") | ||
} | ||
|
||
val generateBuildConfig by tasks | ||
tasks.withType<JavaCompile>().configureEach { | ||
dependsOn(generateBuildConfig) | ||
options.errorprone { | ||
check("NullAway", net.ltgt.gradle.errorprone.CheckSeverity.ERROR) | ||
option("NullAway:AnnotatedPackages", "io.sentry") | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
57 changes: 0 additions & 57 deletions
57
sentry-spring-boot-starter-jakarta/api/sentry-spring-boot-starter-jakarta.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +0,0 @@ | ||
public final class io/sentry/spring/boot/jakarta/BuildConfig { | ||
public static final field SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME Ljava/lang/String; | ||
public static final field VERSION_NAME Ljava/lang/String; | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/InAppIncludesResolver : org/springframework/context/ApplicationContextAware { | ||
public fun <init> ()V | ||
public fun resolveInAppIncludes ()Ljava/util/List; | ||
public fun setApplicationContext (Lorg/springframework/context/ApplicationContext;)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryAutoConfiguration { | ||
public fun <init> ()V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryLogbackAppenderAutoConfiguration { | ||
public fun <init> ()V | ||
public fun sentryLogbackInitializer (Lio/sentry/spring/boot/jakarta/SentryProperties;)Lio/sentry/spring/boot/jakarta/SentryLogbackInitializer; | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryProperties : io/sentry/SentryOptions { | ||
public fun <init> ()V | ||
public fun getExceptionResolverOrder ()I | ||
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 isUseGitCommitIdAsRelease ()Z | ||
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 | ||
public fun setUseGitCommitIdAsRelease (Z)V | ||
public fun setUserFilterOrder (Ljava/lang/Integer;)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryProperties$Logging { | ||
public fun <init> ()V | ||
public fun getLoggers ()Ljava/util/List; | ||
public fun getMinimumBreadcrumbLevel ()Lorg/slf4j/event/Level; | ||
public fun getMinimumEventLevel ()Lorg/slf4j/event/Level; | ||
public fun isEnabled ()Z | ||
public fun setEnabled (Z)V | ||
public fun setLoggers (Ljava/util/List;)V | ||
public fun setMinimumBreadcrumbLevel (Lorg/slf4j/event/Level;)V | ||
public fun setMinimumEventLevel (Lorg/slf4j/event/Level;)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryProperties$Reactive { | ||
public fun <init> ()V | ||
public fun isThreadLocalAccessorEnabled ()Z | ||
public fun setThreadLocalAccessorEnabled (Z)V | ||
} | ||
|
||
public class io/sentry/spring/boot/jakarta/SentryWebfluxAutoConfiguration { | ||
public fun <init> ()V | ||
public fun sentryWebExceptionHandler (Lio/sentry/IHub;)Lio/sentry/spring/jakarta/webflux/SentryWebExceptionHandler; | ||
} | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.