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

fix: Add super calls to GraphqlTrace #1090

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

rmosolgo
Copy link
Contributor

@rmosolgo rmosolgo commented Jul 30, 2024

Oops -- these trace modules are supposed to call super, where other trace modules may add instrumentation. (Calling &block hands control to GraphQL-Ruby, but skips other trace module code.)

My guess is that these weren't converted to super when this module was migrated off of GraphQL-Ruby's own PlatformTrace module which worked differently (or used to have this same bug?).

Fixes rmosolgo/graphql-ruby#5044

TODO:

  • Along the way, I found an issue with how GraphQL::Ruby handles GraphQL::Schema.trace_with(trace_mod) when subclasses already exist and those subclasses have already received .trace_with(...) calls of their own. I'm trying to work that out in Fix default traces added to parent classes after default traces added to child class rmosolgo/graphql-ruby#5045, but that issue is making this test fail (I think...) Never mind, I think I misunderstood because of the ivar reset-related code in the test suite. When I modified my test to use a "fresh" schema class (and manually re-call the setup code), the test failed as expected, then passed when my patch was applied. So I think this is ready to go as-is.

@rmosolgo
Copy link
Contributor Author

🤔 I force-pushed with with an updated commit message, hoping to pass the "conventional commits validation" test, but it's still failing. Is there a way to make it pass?

@arielvalentin arielvalentin changed the title Add super calls to GraphqlTrace fix: Add super calls to GraphqlTrace Jul 30, 2024
@arielvalentin
Copy link
Collaborator

arielvalentin commented Jul 30, 2024

@rmosolgo it validates the PR title not the individual commits. I have updated the title.

@arielvalentin arielvalentin merged commit 117733a into open-telemetry:main Jul 30, 2024
55 of 56 checks passed
@rmosolgo
Copy link
Contributor Author

Oops, thanks!

@rmosolgo rmosolgo deleted the fix-trace-super-calls branch July 30, 2024 21:14
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.

Multiple tracers in one schema are ignored
2 participants