jdbc-observations / datasource-micrometer

Micrometer Observation API instrumentation and Spring Boot 3 Auto-Configuration for JDBC APIs
Apache License 2.0
50 stars 8 forks source link

Always create an observation for ResultSet #9

Closed ttddyy closed 1 year ago

ttddyy commented 1 year ago

When a query result is empty, currently no result-set observation is created. This is because the current logic creates an observation only when ResultSet#next() returns true. (empty result-set returns false on next())

Instead of this behavior, it should always create an observation for ResultSet(when the fetch type is included for the boot property) and tag the row-count=0 for the empty result set.