dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

Convert mysql2 integration to Datadog::Instrumentation API

Open delner opened this issue 3 years ago • 1 comments

This pull request converts the Mysql2 integration over to the datadog-instrumentation API. The changes to this library are entirely internal and do not affect user implementation, or trace data.

Work in progress prototype: DO NOT MERGE!

This is intended to be a proof-of-concept in the development of the new instrumentation API. Some things we may want to take into consideration before merging this:

  1. Is the instrumentation API sufficient for the needs of this integration? Does the API need to be altered in any way?
  2. Should we add a layer within ddtrace that makes the implementation of the API a little more friendly/specific to tracing? (We may only understand the usage patterns better after we convert more integrations and observe the overlap.)
  3. Does this PR need to be broken into smaller pieces? (Especially if we add more code related to the above point?)
  4. Is there any significant performance impact?

delner avatar Aug 20 '21 20:08 delner

This looks nice to me as a first validation step. It will get better with the tracer instrumentation DSL we talked about though, which we should probably wait for before merging so as not to have yet another way to do things, since it's not time sensitive.

lloeki avatar Aug 30 '21 13:08 lloeki