-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Is your feature request related to a problem? Please describe.
For the database we are using in our application, SQL COMMIT commands can take as long as typical DML commands (SELECT, INSERT, UPDATE, DELETE) to execute, and in edge cases, even longer, so we need visibility into when and how long COMMIT commands are running, especially in individual traces but perhaps also in aggregate.
Describe the solution you'd like
We would like to have instrumentation for COMMIT of a similar nature to the instrumentation already provided for DML commands. For JDBC this entails adding instrumentation to the commit method of java.sql.Connection.
Describe alternatives you've considered
We tried adding java.sql.Connection[commit] to otel.instrumentation.methods.include but the results were unsatisfactory for our setup: there were two layers of proxy objects, so each COMMIT resulted in three (nested) spans in the trace.
Additional context
For symmetry, it might also be nice to have instrumentation for ROLLBACK (java.sql.Connection[rollback]) too.