Skip to content

feat!: emit a dedicated metric event for count queries - #662

Merged
gwdp merged 1 commit into
mainfrom
gwdp/count-metric-event
Jul 27, 2026
Merged

feat!: emit a dedicated metric event for count queries#662
gwdp merged 1 commit into
mainfrom
gwdp/count-metric-event

Conversation

@gwdp

@gwdp gwdp commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Why

Count queries reported their result through the load event, so a COUNT(*) returning 8k looked like we loaded 8k entities.

How

Give counts their own event (logDataManagerCountEvent) so the count number stops being read as entities loaded. Breaking: IEntityMetricsAdapter implementers need to add the method; I'm happy to go for another path, non-breaking change if you prefer, but this felt more fundamentally correct

giphy

Test Plan

CI. Updated the metrics unit test to check the counts route to the new event.

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7d1e567) to head (6299d05).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #662   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          109       109           
  Lines        17755     17803   +48     
  Branches       934       935    +1     
=========================================
+ Hits         17755     17803   +48     
Flag Coverage Δ
integration 28.52% <5.55%> (-0.08%) ⬇️
unittest 94.55% <96.29%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp
gwdp marked this pull request as ready for review July 22, 2026 22:53
@gwdp
gwdp requested a review from wschurman as a code owner July 22, 2026 22:53

@wschurman wschurman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesomesauce

@gwdp
gwdp merged commit 59e05de into main Jul 27, 2026
9 checks passed
@gwdp
gwdp deleted the gwdp/count-metric-event branch July 27, 2026 16:01
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