Instrument java.sql.Statement.executeBatch #4476
Labels
contribution welcome
Request makes sense, maintainers probably won't have time, contribution would be welcome
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
We currently cover
java.sql.{Statement,PreparedStatement,CallableStatement}
quite well, but we are missing instrumentation forStatement.executeBatch
.Describe the solution you'd like
At minimum a span:
(Batch of statements)
db.statement
value indicating a batch - probably the same value as the span namedb.statement.count
)EXECUTE_FAILED
For bonus points:
db.statement.error.count
(or similar) attribute with the number of failed statements (return value needed to be iterated anyway for the span status)db.statement
to that value. This would entail instrumentingaddBatch
andclearBatch
and may not be worth the extra overhead. I'd lean towards "don't build this" based on previous experience with instrumenting this API, since batches of "mixed" sql still wouldn't have a better representation anyway.Describe alternatives you've considered
None; this is an odd blind spot in the existing instrumentation, and admittedly a bit of a corner case in the API anyway.
Additional context
N/A.
The text was updated successfully, but these errors were encountered: