Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace GraphQlSourceBuilderCustomizer with directly providing a SentryInstrumenter bean if missing #3744

Open
wants to merge 1 commit into
base: fix/support-graphql-v22
Choose a base branch
from

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Oct 2, 2024

📜 Description

We now provide a SentryInstrumenter bean directly if there is none yet instead of using GraphQlSourceBuilderCustomizer to add the instrumentation.

It is now also possible to provide a bean of type SentryGraphqlInstrumentation.BeforeSpanCallback which is then used by SentryInstrumenter, e.g.:

  @Bean
  SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpanGraphql() {
    return (
      @NotNull ISpan span, @NotNull DataFetchingEnvironment environment, @Nullable Object result) -> {
      span.setData("beforeSpanCallbackData", "hello world");
      return span;
    };
  }

💡 Motivation and Context

Closes #3412

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Replace `GraphQlSourceBuilderCustomizer` with directly providing a `SentryInstrumenter` bean if missing ([#3744](https://github.com/getsentry/sentry-java/pull/3744))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 3346dbc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant