open-telemetry / open-telemetry/opentelemetry-java-instrumentation
JDBC - Add OTEL span attributes for number of rows returned/affected by query
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
Is your feature request related to a problem? Please describe.
Not directly a problem but I am trying to draw correlations between performance problems and number of rows returned by query
Describe the solution you'd like
Similar to the Micrometer implementation:
https://jdbc-observations.github.io/datasource-micrometer/docs/current/docs/html/#observability-spans
It would be awesome to see the attributes jdbc.row-affected jdbc.row-count on the db spans.
Describe alternatives you've considered
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JDBC instrumentation and compare its span behavior with the linked Micrometer observability-spans implementation. Trace where query row counts become available, then add jdbc.row-affected and jdbc.row-count to database spans. Done means both attributes are emitted with the appropriate values for affected and returned rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100