Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bd0c3b4
Check for mixed SDK versions
adinauer Mar 18, 2025
f50173b
Format code
getsentry-bot Mar 20, 2025
a8875cf
format + api
adinauer Mar 20, 2025
c0eea6a
Init noops if mixed versions detected
adinauer Mar 20, 2025
5c09766
Add BuildConfig
adinauer Mar 20, 2025
735ff28
config entries for agentless module sdk names
adinauer Mar 20, 2025
fe20321
Add MANIFEST.MF for JARs
adinauer Mar 20, 2025
901830d
Throw on startup; use manifests for backend; reuse code for otel
adinauer Mar 21, 2025
65a7a6f
Format code
getsentry-bot Mar 21, 2025
62cb98f
Merge branch 'main' into feat/crash-on-startup-with-mixed-versions
adinauer Mar 24, 2025
954610d
Format code
getsentry-bot Mar 24, 2025
8144647
changelog
adinauer Mar 24, 2025
7d1942e
api
adinauer Mar 24, 2025
f062c3e
Merge branch 'main' into feat/manifest-for-jars
adinauer Mar 24, 2025
e72dff6
changelog
adinauer Mar 24, 2025
72c554b
Merge branch 'main' into feat/detect-mixed-sdk-versions
adinauer Mar 24, 2025
60e4cd3
Merge branch 'feat/detect-mixed-sdk-versions' into feat/noop-on-mixed…
adinauer Mar 24, 2025
b1ae3b4
Merge branch 'feat/noop-on-mixed-versions-android' into feat/manifest…
adinauer Mar 24, 2025
e13f518
Merge branch 'feat/manifest-for-jars' into feat/crash-on-startup-with…
adinauer Mar 24, 2025
c3d50ab
Remove duplicate addPackage calls
adinauer Mar 25, 2025
8185388
remove test assertion for package
adinauer Mar 25, 2025
5ecba36
remove test assertion for package
adinauer Mar 26, 2025
9d7449a
Merge branch 'main' into feat/remove-duplicate-add-package-calls
adinauer Mar 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public class FragmentLifecycleIntegration(
application.registerActivityLifecycleCallbacks(this)
options.logger.log(DEBUG, "FragmentLifecycleIntegration installed.")
addIntegrationToSdkVersion("FragmentLifecycle")
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-fragment", BuildConfig.VERSION_NAME)
}

override fun close() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public class SentryNavigationListener @JvmOverloads constructor(

init {
addIntegrationToSdkVersion("NavigationListener")
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-navigation", BuildConfig.VERSION_NAME)
}

override fun onDestinationChanged(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ public class ReplayIntegration(
}

addIntegrationToSdkVersion("Replay")
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-replay", BuildConfig.VERSION_NAME)

finalizePreviousReplay()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public class SentryTimberIntegration(
Timber.plant(tree)

logger.log(SentryLevel.DEBUG, "SentryTimberIntegration installed.")
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-android-timber", VERSION_NAME)
addIntegrationToSdkVersion("Timber")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ class SentryApollo3HttpInterceptor @JvmOverloads constructor(
SentryIntegrationPackageStorage.getInstance()
.addIntegration("Apollo3ClientError")
}
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-apollo-3", BuildConfig.VERSION_NAME)
}

private val regex: Regex by lazy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,6 @@ class SentryApollo3InterceptorTest {
fun `sets SDKVersion Info`() {
assertNotNull(fixture.scopes.options.sdkVersion)
assert(fixture.scopes.options.sdkVersion!!.integrationSet.contains("Apollo3"))
val packageInfo = fixture.scopes.options.sdkVersion!!.packageSet.firstOrNull { pkg -> pkg.name == "maven:io.sentry:sentry-apollo-3" }
assertNotNull(packageInfo)
assert(packageInfo.version == BuildConfig.VERSION_NAME)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class SentryApollo4HttpInterceptor @JvmOverloads constructor(
SentryIntegrationPackageStorage.getInstance()
.addIntegration("Apollo4ClientError")
}
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-apollo-4", BuildConfig.VERSION_NAME)
}

private val regex: Regex by lazy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,6 @@ abstract class SentryApollo4HttpInterceptorTest(
fun `sets SDKVersion Info`() {
assertNotNull(fixture.scopes.options.sdkVersion)
assert(fixture.scopes.options.sdkVersion!!.integrationSet.contains("Apollo4"))
val packageInfo = fixture.scopes.options.sdkVersion!!.packageSet.firstOrNull { pkg -> pkg.name == "maven:io.sentry:sentry-apollo-4" }
assertNotNull(packageInfo)
assert(packageInfo.version == BuildConfig.VERSION_NAME)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class SentryApolloInterceptor(

init {
addIntegrationToSdkVersion("Apollo")
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-apollo", BuildConfig.VERSION_NAME)
}

override fun interceptAsync(request: InterceptorRequest, chain: ApolloInterceptorChain, dispatcher: Executor, callBack: CallBack) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public final class ComposeGestureTargetLocator implements GestureTargetLocator {
public ComposeGestureTargetLocator(final @NotNull ILogger logger) {
this.logger = logger;
SentryIntegrationPackageStorage.getInstance().addIntegration("ComposeUserInteraction");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-compose", BuildConfig.VERSION_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ internal class SentryLifecycleObserver(

init {
addIntegrationToSdkVersion("ComposeNavigation")
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-compose", BuildConfig.VERSION_NAME)
}

override fun onStateChanged(source: LifecycleOwner, event: Lifecycle.Event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ public SentryInstrumentation(
new SentryGraphqlInstrumentation(
beforeSpan, subscriptionHandler, exceptionReporter, ignoredErrorTypes, TRACE_ORIGIN);
SentryIntegrationPackageStorage.getInstance().addIntegration("GraphQL-v22");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-graphql-22", BuildConfig.VERSION_NAME);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ public SentryInstrumentation(
new SentryGraphqlInstrumentation(
beforeSpan, subscriptionHandler, exceptionReporter, ignoredErrorTypes, TRACE_ORIGIN);
SentryIntegrationPackageStorage.getInstance().addIntegration("GraphQL");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-graphql", BuildConfig.VERSION_NAME);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public void onAfterAnyExecute(

private void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance().addIntegration("JDBC");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-jdbc", BuildConfig.VERSION_NAME);
}

private void applyDatabaseDetailsToSpan(
Expand Down
2 changes: 0 additions & 2 deletions sentry-jul/src/main/java/io/sentry/jul/SentryHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ public void close() throws SecurityException {
}

private void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-jul", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("Jul");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ public void append(final @NotNull LogEvent eventObject) {
}

private void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-log4j2", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("Log4j");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ private String formatted(@NotNull ILoggingEvent loggingEvent) {
}

private void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-logback", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("Logback");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public open class SentryOkHttpInterceptor(

init {
addIntegrationToSdkVersion("OkHttp")
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-okhttp", BuildConfig.VERSION_NAME)
}

@Suppress("LongMethod")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public SentryFeignClient(
}

private void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-openfeign", BuildConfig.VERSION_NAME);
addIntegrationToSdkVersion("OpenFeign");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public SentryJobListener() {
public SentryJobListener(final @NotNull IScopes scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes are required");
SentryIntegrationPackageStorage.getInstance().addIntegration("Quartz");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-quartz", BuildConfig.VERSION_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ public void onStartup(@Nullable Set<Class<?>> c, @NotNull ServletContext ctx)
throws ServletException {
ctx.addListener(SentryServletRequestListener.class);
SentryIntegrationPackageStorage.getInstance().addIntegration("Servlet-Jakarta");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-servlet-jakarta", BuildConfig.VERSION_NAME);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ public void onStartup(@Nullable Set<Class<?>> c, @NotNull ServletContext ctx)
throws ServletException {
ctx.addListener(SentryServletRequestListener.class);
SentryIntegrationPackageStorage.getInstance().addIntegration("Servlet");
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-servlet", BuildConfig.VERSION_NAME);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,6 @@ static class ApacheHttpClientTransportFactoryAutoconfiguration {
}

private static void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage(
"maven:io.sentry:sentry-spring-boot-starter-jakarta", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("SpringBoot3");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,6 @@ static class ApacheHttpClientTransportFactoryAutoconfiguration {
}

private static void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring-boot-starter", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("SpringBoot");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ private void registerSentryExceptionResolver(
}

private static void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring-jakarta", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("Spring6");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ private void registerSentryExceptionResolver(
}

private static void addPackageAndIntegrationInfo() {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring", BuildConfig.VERSION_NAME);
SentryIntegrationPackageStorage.getInstance().addIntegration("Spring");
}
}
Loading