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

Tracer migration refactor #81

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

swalkinshaw
Copy link
Contributor

@swalkinshaw swalkinshaw commented Apr 26, 2024

Originally the purpose of this was to fix #78 but I wanted to see how far I could simplifying this, removing old compatibility support, and removing unneeded features. This is a draft PR since I'm looking for overall feedback.

This PR does many things, but here's a rough summary:

  1. migrates from the instrumentation to a trace module
  2. converts to a use interface which sets up the necessary trace modules and query analyzer with a capture_timings option
  3. refactors the query analyzer to be 100% standalone. The instrumentation trace depends on the analyzer, but no the other way around anymore
  4. adds the concept of a "metrics processor" which is what consumers of this library would implement. This replaces inheriting from our analyzer and provides a specific interface to implement
  5. removes most start times and time offsets. This was originally done to support Apollo's tracing spec but that's been deprecated for years
  6. removes the old tracing compatible code
  7. removed lexing times since they don't exist in the Ruby parser anymore. Most projects shouldn't use the C parser so I figured let's just remove it entirely.

I assume this will lower memory allocations and have better performance too but I haven't done any benchmarks yet. There's a lot less objects and hashes allocated if nothing else.

cc @Shopify/api-patterns-team

@swalkinshaw swalkinshaw force-pushed the tracer-migration-refactor branch 2 times, most recently from 7e7da8b to ba8250a Compare April 30, 2024 19:45
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.

Schema.instrument is deprecated
1 participant