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

Instrumentation for JDBC transaction commits #10381

Open
zhenlin-pay2 opened this issue Feb 2, 2024 · 1 comment
Open

Instrumentation for JDBC transaction commits #10381

zhenlin-pay2 opened this issue Feb 2, 2024 · 1 comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request needs triage New issue that requires triage

Comments

@zhenlin-pay2
Copy link

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.

@zhenlin-pay2 zhenlin-pay2 added enhancement New feature or request needs triage New issue that requires triage labels Feb 2, 2024
@trask trask moved this to Post Stability in Database Client Semantic Conventions Feb 21, 2024
@breedx-splk breedx-splk added the contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome label Feb 22, 2024
tkmsaaaam added a commit to tkmsaaaam/opentelemetry-java-instrumentation that referenced this issue Jun 1, 2024
To enable trace when transaction commit or rollback in jdbc.
@tkmsaaaam
Copy link

I try to contribute for this issue in the PR #11517 . So please check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request needs triage New issue that requires triage
Projects
Status: Post Stability
Development

No branches or pull requests

3 participants