Repository navigation
Add consumers metric to metrics command - #94
Merged
Merged
Conversation
itssimon
enabled auto-merge (squash)
October 28, 2026 06:54
Contributor
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Confidence score: 4/5
- In
skills/apitally-cli/references/commands.md, omitting the caveat could lead users to double-count consumers when aggregating DuckDB rows or NDJSON output. Restore the note that distinct counts can’t be summed across periods or groups.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/apitally-cli/references/commands.md">
<violation number="1" location="skills/apitally-cli/references/commands.md:115">
P2: The new `consumers` documentation omits that this distinct count cannot be summed across periods or groups. Users aggregating the DuckDB rows or NDJSON output can therefore double-count consumers; restore the caveat in the command reference, CLI help, and schema reference.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| | --------------------- | ------- | -------------------------------------- | | ||
| | `requests` | integer | Total request count | | ||
| | `requests_per_minute` | float | Requests per minute | | ||
| | `consumers` | integer | Number of distinct consumers | |
Contributor
There was a problem hiding this comment.
P2: The new consumers documentation omits that this distinct count cannot be summed across periods or groups. Users aggregating the DuckDB rows or NDJSON output can therefore double-count consumers; restore the caveat in the command reference, CLI help, and schema reference.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At skills/apitally-cli/references/commands.md, line 115:
<comment>The new `consumers` documentation omits that this distinct count cannot be summed across periods or groups. Users aggregating the DuckDB rows or NDJSON output can therefore double-count consumers; restore the caveat in the command reference, CLI help, and schema reference.</comment>
<file context>
@@ -108,21 +108,21 @@ Fetch aggregated metrics for an app. Outputs NDJSON to stdout by default.
+| --------------------- | ------- | -------------------------------------- |
+| `requests` | integer | Total request count |
+| `requests_per_minute` | float | Requests per minute |
+| `consumers` | integer | Number of distinct consumers |
+| `bytes_received` | integer | Total bytes received |
+| `bytes_sent` | integer | Total bytes sent |
</file context>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
==========================================
+ Coverage 91.88% 91.89% +0.01%
==========================================
Files 13 13
Lines 2477 2481 +4
==========================================
+ Hits 2276 2280 +4
Misses 201 201 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for the new
consumersmetric ofPOST /v1/apps/{app_id}/metrics(apitally/cloud#1549): the number of distinct consumers per row.consumers BIGINTcolumn to the DuckDBmetricstable (withALTER TABLE ... ADD COLUMN IF NOT EXISTSfor existing databases).consumersafterrequests_per_minutein the--metricshelp text, the skill's command reference, and the DuckDB schema reference.test_run_with_dbto cover the new column.