diff --git a/sentry-android-core/src/main/java/io/sentry/android/core/CurrentActivityIntegration.java b/sentry-android-core/src/main/java/io/sentry/android/core/CurrentActivityIntegration.java index 0b618636d32..3ce358efbc5 100644 --- a/sentry-android-core/src/main/java/io/sentry/android/core/CurrentActivityIntegration.java +++ b/sentry-android-core/src/main/java/io/sentry/android/core/CurrentActivityIntegration.java @@ -1,11 +1,14 @@ package io.sentry.android.core; +import static io.sentry.util.IntegrationUtils.addIntegrationToSdkVersion; + import android.app.Activity; import android.app.Application; import android.os.Bundle; import androidx.annotation.NonNull; import io.sentry.IScopes; import io.sentry.Integration; +import io.sentry.SentryLevel; import io.sentry.SentryOptions; import io.sentry.util.Objects; import java.io.Closeable; @@ -27,6 +30,8 @@ public CurrentActivityIntegration(final @NotNull Application application) { @Override public void register(@NotNull IScopes scopes, @NotNull SentryOptions options) { application.registerActivityLifecycleCallbacks(this); + options.getLogger().log(SentryLevel.DEBUG, "CurrentActivityIntegration installed."); + addIntegrationToSdkVersion("CurrentActivity"); } @Override diff --git a/sentry-android-core/src/main/java/io/sentry/android/core/EnvelopeFileObserverIntegration.java b/sentry-android-core/src/main/java/io/sentry/android/core/EnvelopeFileObserverIntegration.java index a921f794588..482d90c6e6c 100644 --- a/sentry-android-core/src/main/java/io/sentry/android/core/EnvelopeFileObserverIntegration.java +++ b/sentry-android-core/src/main/java/io/sentry/android/core/EnvelopeFileObserverIntegration.java @@ -1,5 +1,7 @@ package io.sentry.android.core; +import static io.sentry.util.IntegrationUtils.addIntegrationToSdkVersion; + import io.sentry.ILogger; import io.sentry.IScopes; import io.sentry.ISentryLifecycleToken; @@ -80,6 +82,7 @@ private void startOutboxSender( try { observer.startWatching(); options.getLogger().log(SentryLevel.DEBUG, "EnvelopeFileObserverIntegration installed."); + addIntegrationToSdkVersion("EnvelopeFileObserver"); } catch (Throwable e) { // it could throw eg NoSuchFileException or NullPointerException options diff --git a/sentry-openfeign/src/main/java/io/sentry/openfeign/SentryFeignClient.java b/sentry-openfeign/src/main/java/io/sentry/openfeign/SentryFeignClient.java index 935c4229ab1..37a52af1646 100644 --- a/sentry-openfeign/src/main/java/io/sentry/openfeign/SentryFeignClient.java +++ b/sentry-openfeign/src/main/java/io/sentry/openfeign/SentryFeignClient.java @@ -2,15 +2,18 @@ import static io.sentry.TypeCheckHint.OPEN_FEIGN_REQUEST; import static io.sentry.TypeCheckHint.OPEN_FEIGN_RESPONSE; +import static io.sentry.util.IntegrationUtils.addIntegrationToSdkVersion; import feign.Client; import feign.Request; import feign.Response; import io.sentry.BaggageHeader; import io.sentry.Breadcrumb; +import io.sentry.BuildConfig; import io.sentry.Hint; import io.sentry.IScopes; import io.sentry.ISpan; +import io.sentry.SentryIntegrationPackageStorage; import io.sentry.SpanDataConvention; import io.sentry.SpanOptions; import io.sentry.SpanStatus; @@ -42,6 +45,13 @@ public SentryFeignClient( this.delegate = Objects.requireNonNull(delegate, "delegate is required"); this.scopes = Objects.requireNonNull(scopes, "scopes are required"); this.beforeSpan = beforeSpan; + addPackageAndIntegrationInfo(); + } + + private void addPackageAndIntegrationInfo() { + SentryIntegrationPackageStorage.getInstance() + .addPackage("maven:io.sentry:sentry-openfeign", BuildConfig.VERSION_NAME); + addIntegrationToSdkVersion("OpenFeign"); } @Override diff --git a/sentry/src/main/java/io/sentry/SpotlightIntegration.java b/sentry/src/main/java/io/sentry/SpotlightIntegration.java index 0b69ae79be7..910259ad131 100644 --- a/sentry/src/main/java/io/sentry/SpotlightIntegration.java +++ b/sentry/src/main/java/io/sentry/SpotlightIntegration.java @@ -3,6 +3,7 @@ import static io.sentry.SentryLevel.DEBUG; import static io.sentry.SentryLevel.ERROR; import static io.sentry.SentryLevel.WARNING; +import static io.sentry.util.IntegrationUtils.addIntegrationToSdkVersion; import io.sentry.util.Platform; import java.io.Closeable; @@ -34,6 +35,7 @@ public void register(@NotNull IScopes scopes, @NotNull SentryOptions options) { executorService = new SentryExecutorService(); options.setBeforeEnvelopeCallback(this); logger.log(DEBUG, "SpotlightIntegration enabled."); + addIntegrationToSdkVersion("Spotlight"); } else { logger.log( DEBUG,