sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

RuntimeException in io.sentry.graphql.SentryInstrumentation

Open kahest opened this issue 1 year ago • 1 comments

Description

RuntimeException in io.sentry.graphql.SentryInstrumentation in lambda$instrumentExecutionResult$0 at line 208

Affected packages and versions:

  • see Discover
  • note that versions before 7.0.0 might also be affected but SDK crash reporting is only supported from version 7.0.0+

Internal references:

kahest avatar Apr 10 '24 13:04 kahest

While this might also report SDK bugs, it's most likely just an error going out through GraphQL errors.

It's being detected as a crash because the integration creates the RuntimeException as there's no throwable to wrap but just a message. We should ignore the exception for crash detection.

There's multiple things we could use to ignore it:

  • A:
"mechanism": {
          "type": "GraphqlInstrumentation",
          "handled": false
        }
  • B: last SDK stack trace frame
{
	"function": "lambda$instrumentExecutionResult$0",
	"module": "io.sentry.graphql.SentryInstrumentation",
	"filename": "SentryInstrumentation.java",
}
  • C: https://github.com/getsentry/sentry/blob/eb1e3ca7936ef51561e8206adcef02d5244d6e68/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py

Most likely B is what we want. The name of the function might change but that shouldn't happen often - we should document this next to the function. For existing releases of the SDK we'll have to ignore as mentioned above. Where we create the exception should probably be separated out into each own function so it's even less likely to change over time then ignore whatever the name is.

adinauer avatar Apr 11 '24 12:04 adinauer