Skip to content

feat: Record db.client.response.affected_rows histogram - #33

Merged
chmodas merged 1 commit into
trunkfrom
affected-rows-histogram
May 4, 2026
Merged

feat: Record db.client.response.affected_rows histogram#33
chmodas merged 1 commit into
trunkfrom
affected-rows-histogram

Conversation

@chmodas

@chmodas chmodas commented May 4, 2026

Copy link
Copy Markdown
Owner

Mirror the existing db.response.affected_rows span attribute as a metric so dashboards can slice mutation throughput by the same dimensions they already use for duration / returned_rows. Recorded on execute() calls – the path where QueryResult::rows_affected() is meaningful – with the same connection / annotation / error attribute set as the duration histogram. Not recorded for execute_many (deprecated upstream). The metric is custom (no OTel semconv equivalent); the name db.client.response.affected_rows follows the db.client.response.returned_rows naming pattern.

@codecov-commenter

codecov-commenter commented May 4, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (32dd1d5) to head (968dc69).
⚠️ Report is 1 commits behind head on trunk.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk      #33   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          12       12           
  Lines        2164     2182   +18     
=======================================
+ Hits         2163     2181   +18     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Mirror the existing `db.response.affected_rows` span attribute as a metric so
dashboards can slice mutation throughput by the same dimensions they already use
for duration / returned_rows. Recorded on `execute()` calls – the path where
`QueryResult::rows_affected()` is meaningful – with the same connection /
annotation / error attribute set as the duration histogram. Not recorded for
`execute_many` (deprecated upstream). The metric is custom (no OTel semconv
equivalent); the name `db.client.response.affected_rows` follows the
`db.client.response.returned_rows` naming pattern.
@chmodas
chmodas force-pushed the affected-rows-histogram branch from b08c025 to 968dc69 Compare May 4, 2026 16:23
@chmodas
chmodas merged commit 00f43f2 into trunk May 4, 2026
2 checks passed
@chmodas
chmodas deleted the affected-rows-histogram branch May 4, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants