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

Add PerfettoTracing for detailed query execution profiling #5214

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Jan 27, 2025

This extends GraphQL::Tracing to have some different hook methods and adds an implementation for the Perfetto Trace Viewer.

image

I was looking for something with better support for async trace rendering and discovered Perfetto. In the end, I'm not really using its parallel trace capability, but its custom "tracks" and "flows" are great because it can link field execution to Dataloader::Source#fetch calls.

TODO:

  • Add new methods to base Trace class
  • In another PR, update other tracing implementations to use begin/end hooks to support Fiber pauses better
  • Add a development cop which checks for super in implementation methods
  • Backwards compat for Dataloader#yield without args?
  • Handle the optional dependency of google-protobuf nicely
  • Test with AsyncDataloader
  • Document

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