dd-trace-rb
dd-trace-rb copied to clipboard
Implement method tracing API
WIP: Some tasks to be done
- [x] System tests are failing
- [ ] Instrumentation API does not support ruby
3.2
at the moment - [ ]
disable
/enable
functionality does not seem to be working as intended on instrumentation gem side (i.e. even when hook is disabled, it still produces traces) - [ ] Sorbet checks are failing
What does this PR do?
This PR adds a method tracing API that can be used by:
- Customers tracing their own code
- Customers looking to trace code from gems we don't yet instrument
- Us when developing new integrations
Motivation
Method tracing has been requested for a long time by the community. This implementation makes use of the instrumentation API to provide users with an easy interface to implement custom instrumentation.
Additional Notes
The number of changed files is inflated because of the changes to the gemfile. Main change is in the tracing/contrib/hook.rb
file.
How to test the change?
Unit tests have been added to test the changes. pg
and mysql2
instrumentations were modified as a POC that the API works (the original instrumentation code was not deleted in this branch).