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

contrib/99designs/gqlgen: fix introspection query detection by checking Operation.Name #3175

Merged
merged 9 commits into from
Feb 20, 2025

Conversation

LamineKouissi
Copy link
Contributor

What does this PR do?

contrib/99designs/gqlgen: fix introspection query detection by checking Operation.Name

Motivation

InterceptField() relied on OperationName to identify introspection queries. This was insufficient as valid introspection queries can have an unset OperationName while Operation.Name is set to IntrospectionQuery.

Could Fix #3085

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@LamineKouissi LamineKouissi requested review from a team as code owners February 11, 2025 15:56
contrib/99designs/gqlgen/tracer.go Outdated Show resolved Hide resolved
@LamineKouissi
Copy link
Contributor Author

Hi @darccio @rarguelloF
Could you please let me know if any changes are needed? If everything looks good, I’d appreciate if you merge it.

@LamineKouissi
Copy link
Contributor Author

Hi @rarguelloF, do I need to merge main into my PR every time there's a change, or can you handle that during the PR merge?

@darccio darccio enabled auto-merge (squash) February 18, 2025 16:37
@darccio darccio merged commit 3810d5a into DataDog:main Feb 20, 2025
80 of 81 checks passed
@darccio
Copy link
Member

darccio commented Feb 20, 2025

Thanks @LamineKouissi for contributing this.

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.

[BUG] GQLgen Tracer - Introspection query is not always being filtered
4 participants