Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ object Config {
val SENTRY_SPRING_BOOT_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot"
val SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot.jakarta"
val SENTRY_OPENTELEMETRY_AGENT_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agent"
val SENTRY_OPENTELEMETRY_AGENTLESS_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agentless"
val SENTRY_OPENTELEMETRY_AGENTLESS_SPRING_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agentless-spring"
val SENTRY_APOLLO3_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.apollo3"
val SENTRY_APOLLO4_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.apollo4"
val SENTRY_APOLLO_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.apollo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ public class FragmentLifecycleIntegration(
Integration,
Closeable {

private companion object {
init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-fragment", BuildConfig.VERSION_NAME)
}
}

public constructor(application: Application) : this(
application = application,
filterFragmentLifecycleBreadcrumbs = FragmentLifecycleState.states,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,10 @@ public class SentryNavigationListener @JvmOverloads constructor(

public companion object {
public const val NAVIGATION_OP: String = "navigation"

init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-navigation", BuildConfig.VERSION_NAME)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.sentry.android.ndk;

import io.sentry.SentryIntegrationPackageStorage;
import io.sentry.protocol.SdkVersion;
import org.jetbrains.annotations.Nullable;

Expand All @@ -8,6 +9,11 @@
*/
final class SentryNdkUtil {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-ndk", BuildConfig.VERSION_NAME);
}

private SentryNdkUtil() {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public class ReplayIntegration(
IConnectionStatusObserver,
IRateLimitObserver {

private companion object {
init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-replay", BuildConfig.VERSION_NAME)
}
}

// needed for the Java's call site
public constructor(context: Context, dateProvider: ICurrentDateProvider) : this(
context.appContext(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public class SentryTimberIntegration(
private lateinit var tree: SentryTimberTree
private lateinit var logger: ILogger

private companion object {
init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-android-timber", VERSION_NAME)
}
}

override fun register(scopes: IScopes, options: SentryOptions) {
logger = options.logger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,5 +453,10 @@ class SentryApollo3HttpInterceptor @JvmOverloads constructor(
const val SENTRY_APOLLO_3_VARIABLES = "SENTRY-APOLLO-3-VARIABLES"
const val SENTRY_APOLLO_3_OPERATION_TYPE = "SENTRY-APOLLO-3-OPERATION-TYPE"
const val DEFAULT_CAPTURE_FAILED_REQUESTS = true

init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-apollo-3", BuildConfig.VERSION_NAME)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -449,5 +449,10 @@ class SentryApollo4HttpInterceptor @JvmOverloads constructor(

companion object {
const val DEFAULT_CAPTURE_FAILED_REQUESTS = true

init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-apollo-4", BuildConfig.VERSION_NAME)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class SentryApolloInterceptor(
private val beforeSpan: BeforeSpanCallback? = null
) : ApolloInterceptor {

private companion object {
init {
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-apollo", BuildConfig.VERSION_NAME)
}
}

constructor(scopes: IScopes) : this(scopes, null)
constructor(beforeSpan: BeforeSpanCallback) : this(ScopesAdapter.getInstance(), beforeSpan)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public final class ComposeGestureTargetLocator implements GestureTargetLocator {
private volatile @Nullable SentryComposeHelper composeHelper;
private final @NotNull AutoClosableReentrantLock lock = new AutoClosableReentrantLock();

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-compose", BuildConfig.VERSION_NAME);
}

public ComposeGestureTargetLocator(final @NotNull ILogger logger) {
this.logger = logger;
SentryIntegrationPackageStorage.getInstance().addIntegration("ComposeUserInteraction");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ internal class SentryLifecycleObserver(
SentryNavigationListener(traceOriginAppendix = TRACE_ORIGIN_APPENDIX)
) : LifecycleEventObserver {

private companion object {
init {
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-compose", BuildConfig.VERSION_NAME)
}
}

init {
addIntegrationToSdkVersion("ComposeNavigation")
SentryIntegrationPackageStorage.getInstance().addPackage("maven:io.sentry:sentry-compose", BuildConfig.VERSION_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
public final class SentryInstrumentation
extends graphql.execution.instrumentation.SimplePerformantInstrumentation {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-graphql-22", BuildConfig.VERSION_NAME);
}

/**
* @deprecated please use {@link SentryGraphqlInstrumentation#SENTRY_SCOPES_CONTEXT_KEY}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
public final class SentryInstrumentation
extends graphql.execution.instrumentation.SimpleInstrumentation {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-graphql", BuildConfig.VERSION_NAME);
}

/**
* @deprecated please use {@link SentryGraphqlInstrumentation#SENTRY_SCOPES_CONTEXT_KEY}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public class SentryJdbcEventListener extends SimpleJdbcEventListener {
protected final @NotNull AutoClosableReentrantLock databaseDetailsLock =
new AutoClosableReentrantLock();

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-jdbc", BuildConfig.VERSION_NAME);
}

public SentryJdbcEventListener(final @NotNull IScopes scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes are required");
addPackageAndIntegrationInfo();
Expand Down
5 changes: 5 additions & 0 deletions sentry-jul/src/main/java/io/sentry/jul/SentryHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public class SentryHandler extends Handler {
private @NotNull Level minimumBreadcrumbLevel = Level.INFO;
private @NotNull Level minimumEventLevel = Level.SEVERE;

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-jul", BuildConfig.VERSION_NAME);
}

/** Creates an instance of SentryHandler. */
public SentryHandler() {
this(new SentryOptions());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public class SentryAppender extends AbstractAppender {
private final @NotNull IScopes scopes;
private final @Nullable List<String> contextTags;

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-log4j2", BuildConfig.VERSION_NAME);
}

public SentryAppender(
final @NotNull String name,
final @Nullable Filter filter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public class SentryAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
private @NotNull Level minimumEventLevel = Level.ERROR;
private @Nullable Encoder<ILoggingEvent> encoder;

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-logback", BuildConfig.VERSION_NAME);
}

@Override
public void start() {
if (options.getDsn() == null || !options.getDsn().endsWith("_IS_UNDEFINED")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ public open class SentryOkHttpInterceptor(
private val failedRequestTargets: List<String> = listOf(DEFAULT_PROPAGATION_TARGETS)
) : Interceptor {

private companion object {
init {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-okhttp", BuildConfig.VERSION_NAME)
}
}

public constructor() : this(ScopesAdapter.getInstance())
public constructor(scopes: IScopes) : this(scopes, null)
public constructor(beforeSpan: BeforeSpanCallback) : this(ScopesAdapter.getInstance(), beforeSpan)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public final class SentryFeignClient implements Client {
private final @NotNull IScopes scopes;
private final @Nullable BeforeSpanCallback beforeSpan;

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-openfeign", BuildConfig.VERSION_NAME);
}

public SentryFeignClient(
final @NotNull Client delegate,
final @NotNull IScopes scopes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
`java-library`
id(Config.BuildPlugins.buildConfig) version Config.BuildPlugins.buildConfigVersion
}

dependencies {
Expand All @@ -12,3 +13,10 @@ dependencies {
api(Config.Libs.OpenTelemetry.otelExtensionAutoconfigure)
api(Config.Libs.springBoot3StarterOpenTelemetry)
}

buildConfig {
useJavaOutput()
packageName("io.sentry.opentelemetry.agentless.spring")
buildConfigField("String", "SENTRY_OPENTELEMETRY_AGENTLESS_SPRING_SDK_NAME", "\"${Config.Sentry.SENTRY_OPENTELEMETRY_AGENTLESS_SPRING_SDK_NAME}\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
package io.sentry.opentelemetry.agent;

public final class AgentlessSpringMarker {}
import io.sentry.SentryIntegrationPackageStorage;
import io.sentry.opentelemetry.agentless.spring.BuildConfig;

public final class AgentlessSpringMarker {
static {
SentryIntegrationPackageStorage.getInstance()
.addPackage(
"maven:io.sentry:sentry-opentelemetry-agentless-spring", BuildConfig.VERSION_NAME);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
`java-library`
id(Config.BuildPlugins.buildConfig) version Config.BuildPlugins.buildConfigVersion
}

dependencies {
Expand All @@ -11,3 +12,10 @@ dependencies {
api(Config.Libs.OpenTelemetry.otelSemconvIncubating)
api(Config.Libs.OpenTelemetry.otelExtensionAutoconfigure)
}

buildConfig {
useJavaOutput()
packageName("io.sentry.opentelemetry.agentless")
buildConfigField("String", "SENTRY_OPENTELEMETRY_AGENTLESS_SDK_NAME", "\"${Config.Sentry.SENTRY_OPENTELEMETRY_AGENTLESS_SDK_NAME}\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
package io.sentry.opentelemetry.agent;

public final class AgentlessMarker {}
import io.sentry.SentryIntegrationPackageStorage;
import io.sentry.opentelemetry.agentless.BuildConfig;

public final class AgentlessMarker {
static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-opentelemetry-agentless", BuildConfig.VERSION_NAME);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
@ApiStatus.Experimental
public final class SentryJobListener implements JobListener {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-quartz", BuildConfig.VERSION_NAME);
}

public static final String SENTRY_CHECK_IN_ID_KEY = "sentry-checkin-id";
public static final String SENTRY_SLUG_KEY = "sentry-slug";
public static final String SENTRY_SCOPE_LIFECYCLE_TOKEN_KEY = "sentry-scope-lifecycle";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
@Open
public class SentryServletContainerInitializer implements ServletContainerInitializer {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-servlet-jakarta", BuildConfig.VERSION_NAME);
}

@Override
public void onStartup(@Nullable Set<Class<?>> c, @NotNull ServletContext ctx)
throws ServletException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
@Open
public class SentryServletContainerInitializer implements ServletContainerInitializer {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-servlet", BuildConfig.VERSION_NAME);
}

@Override
public void onStartup(@Nullable Set<Class<?>> c, @NotNull ServletContext ctx)
throws ServletException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
@Open
public class SentryAutoConfiguration {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring-boot-starter-jakarta", BuildConfig.VERSION_NAME);
}

/** Registers general purpose Sentry related beans. */
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(SentryProperties.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
@Open
public class SentryAutoConfiguration {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring-boot-starter", BuildConfig.VERSION_NAME);
}

/** Registers general purpose Sentry related beans. */
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(SentryProperties.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
@Open
public class SentryHubRegistrar implements ImportBeanDefinitionRegistrar {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring-jakarta", BuildConfig.VERSION_NAME);
}

@Override
public void registerBeanDefinitions(
final @NotNull AnnotationMetadata importingClassMetadata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
@Open
public class SentryHubRegistrar implements ImportBeanDefinitionRegistrar {

static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-spring", BuildConfig.VERSION_NAME);
}

@Override
public void registerBeanDefinitions(
final @NotNull AnnotationMetadata importingClassMetadata,
Expand Down
Loading
Loading