Skip to content

Commit

Permalink
graphql 22 update instrumentation (#3974)
Browse files Browse the repository at this point in the history
* replace deprecated SimpleInstrumentation with SimplePerformantInstrumentation

* dump api

* add readme
  • Loading branch information
lbloder authored Dec 17, 2024
1 parent 30f169f commit eac1c49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sentry-graphql-22/api/sentry-graphql-22.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> (Lio/sentry/graphql/SentryGraphqlInstrumentation$BeforeSpanCallback;Lio/sentry/graphql/SentrySubscriptionHandler;Lio/sentry/graphql/ExceptionReporter;Ljava/util/List;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -144,7 +143,7 @@ public SentryInstrumentation(
}

@Override
@SuppressWarnings({"FutureReturnValueIgnored", "deprecation"})
@SuppressWarnings({"FutureReturnValueIgnored"})
public @NotNull DataFetcher<?> instrumentDataFetcher(
final @NotNull DataFetcher<?> dataFetcher,
final @NotNull InstrumentationFieldFetchParameters parameters,
Expand Down

0 comments on commit eac1c49

Please sign in to comment.