Class SentryInstrumentation

java.lang.Object
graphql.execution.instrumentation.SimpleInstrumentation
io.sentry.graphql.SentryInstrumentation
All Implemented Interfaces:
graphql.execution.instrumentation.Instrumentation

public final class SentryInstrumentation extends graphql.execution.instrumentation.SimpleInstrumentation
  • Field Details

  • Constructor Details

    • SentryInstrumentation

      @Deprecated public SentryInstrumentation()
      Deprecated.
      please use a constructor that takes a SentrySubscriptionHandler instead.
    • SentryInstrumentation

      @Deprecated public SentryInstrumentation(@Nullable @Nullable IHub hub)
      Deprecated.
      please use a constructor that takes a SentrySubscriptionHandler instead.
    • SentryInstrumentation

      @Deprecated public SentryInstrumentation(@Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan)
      Deprecated.
      please use a constructor that takes a SentrySubscriptionHandler instead.
    • SentryInstrumentation

      @Deprecated public SentryInstrumentation(@Nullable @Nullable IHub hub, @Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan)
      Deprecated.
      please use a constructor that takes a SentrySubscriptionHandler instead.
    • SentryInstrumentation

      public SentryInstrumentation(@Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions)
      Parameters:
      beforeSpan - callback when a span is created
      subscriptionHandler - can report subscription errors
      captureRequestBodyForNonSubscriptions - false if request bodies should not be captured by this integration for query and mutation operations. This can be used to prevent unnecessary work by not adding the request body when another integration will add it anyways, as is the case with our spring integration for WebMVC.
    • SentryInstrumentation

      public SentryInstrumentation(@Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull @NotNull List<String> ignoredErrorTypes)
      Parameters:
      beforeSpan - callback when a span is created
      subscriptionHandler - can report subscription errors
      captureRequestBodyForNonSubscriptions - false if request bodies should not be captured by this integration for query and mutation operations. This can be used to prevent unnecessary work by not adding the request body when another integration will add it anyways, as is the case with our spring integration for WebMVC.
      ignoredErrorTypes - list of error types that should not be captured and sent to Sentry
    • SentryInstrumentation

      @TestOnly public SentryInstrumentation(@Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, @NotNull @NotNull ExceptionReporter exceptionReporter, @NotNull @NotNull List<String> ignoredErrorTypes)
    • SentryInstrumentation

      public SentryInstrumentation(@NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions)
      Parameters:
      subscriptionHandler - can report subscription errors
      captureRequestBodyForNonSubscriptions - false if request bodies should not be captured by this integration for query and mutation operations. This can be used to prevent unnecessary work by not adding the request body when another integration will add it anyways, as is the case with our spring integration for WebMVC.
  • Method Details

    • createState

      @NotNull public @NotNull graphql.execution.instrumentation.InstrumentationState createState()
    • beginExecution

      @NotNull public @NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecution(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters)
      Specified by:
      beginExecution in interface graphql.execution.instrumentation.Instrumentation
      Overrides:
      beginExecution in class graphql.execution.instrumentation.SimpleInstrumentation
    • instrumentExecutionResult

      public CompletableFuture<graphql.ExecutionResult> instrumentExecutionResult(graphql.ExecutionResult executionResult, graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters)
    • beginExecuteOperation

      @NotNull public @NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecuteOperation(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters)
      Specified by:
      beginExecuteOperation in interface graphql.execution.instrumentation.Instrumentation
      Overrides:
      beginExecuteOperation in class graphql.execution.instrumentation.SimpleInstrumentation
    • instrumentDataFetcher

      @NotNull public @NotNull graphql.schema.DataFetcher<?> instrumentDataFetcher(@NotNull @NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters)