diff --git a/CHANGELOG.md b/CHANGELOG.md index 993d02a397..35c3cd7448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ - To enable the auto configuration of it, please set `-Dotel.java.global-autoconfigure.enabled=true` on the `java` command, when starting your application. - You may also want to set `OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none` env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use. +### Fixes +- Replace deprecated `SimpleInstrumentation` with `SimplePerformantInstrumentation` for graphql 22 ([#3974](https://github.com/getsentry/sentry-java/pull/3974)) + ## 8.0.0-rc.2 ### Fixes diff --git a/sentry-graphql-22/api/sentry-graphql-22.api b/sentry-graphql-22/api/sentry-graphql-22.api index b456fd98bf..2bee0cf765 100644 --- a/sentry-graphql-22/api/sentry-graphql-22.api +++ b/sentry-graphql-22/api/sentry-graphql-22.api @@ -3,7 +3,7 @@ public final class io/sentry/graphql22/BuildConfig { public static final field VERSION_NAME Ljava/lang/String; } -public final class io/sentry/graphql22/SentryInstrumentation : graphql/execution/instrumentation/SimpleInstrumentation { +public final class io/sentry/graphql22/SentryInstrumentation : graphql/execution/instrumentation/SimplePerformantInstrumentation { public static final field SENTRY_EXCEPTIONS_CONTEXT_KEY Ljava/lang/String; public static final field SENTRY_SCOPES_CONTEXT_KEY Ljava/lang/String; public fun (Lio/sentry/graphql/SentryGraphqlInstrumentation$BeforeSpanCallback;Lio/sentry/graphql/SentrySubscriptionHandler;Lio/sentry/graphql/ExceptionReporter;Ljava/util/List;)V diff --git a/sentry-graphql-22/src/main/java/io/sentry/graphql22/SentryInstrumentation.java b/sentry-graphql-22/src/main/java/io/sentry/graphql22/SentryInstrumentation.java index 47881ceac8..a62eeade70 100644 --- a/sentry-graphql-22/src/main/java/io/sentry/graphql22/SentryInstrumentation.java +++ b/sentry-graphql-22/src/main/java/io/sentry/graphql22/SentryInstrumentation.java @@ -19,9 +19,8 @@ import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.TestOnly; -@SuppressWarnings("deprecation") public final class SentryInstrumentation - extends graphql.execution.instrumentation.SimpleInstrumentation { + extends graphql.execution.instrumentation.SimplePerformantInstrumentation { /** * @deprecated please use {@link SentryGraphqlInstrumentation#SENTRY_SCOPES_CONTEXT_KEY} @@ -144,7 +143,7 @@ public SentryInstrumentation( } @Override - @SuppressWarnings({"FutureReturnValueIgnored", "deprecation"}) + @SuppressWarnings({"FutureReturnValueIgnored"}) public @NotNull DataFetcher instrumentDataFetcher( final @NotNull DataFetcher dataFetcher, final @NotNull InstrumentationFieldFetchParameters parameters,