Skip to content

Add consumer fields, body text fields and sorting - #104

Merged
itssimon merged 6 commits into
mainfrom
consumer-fields-and-sorting
Nov 13, 2026
Merged

itssimon merged 6 commits into
mainfrom
consumer-fields-and-sorting

Conversation

@itssimon

@itssimon itssimon commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Breaking changes

  • request-logs returns consumer_identifier instead of consumer_id by default. Request consumer_id with --fields if needed.
  • consumers outputs the group as its name ("group":"Admins") instead of an object with id and name.

Changes

  • Adds consumer_identifier, consumer_name and consumer_group to request-logs (fields and filters) and metrics (group-by and filters), with new columns in the DuckDB request_logs and metrics tables (added to existing databases with ALTER TABLE).
  • Request logs reference a consumer by its identifier, like they reference an environment and an endpoint by name. The CLI sends the default field list for request-logs itself.
  • Adds request_body_text and response_body_text to request-logs, with new columns in the DuckDB request_logs table. The help and skill explain when to use the text fields and when the JSON fields.
  • Adds --sort-by and --sort-direction to request-logs and traces. The --limit help states which rows are kept without sort flags.
  • Makes --since optional for request-logs; the API requires it unless a request_uuid filter uses eq or in.
  • request-details outputs consumer_identifier and writes it to the request_logs table.
  • Updates the --filters help for metrics, request-logs and traces, and the shared Filters section in references/commands.md:
    • request_body_json and response_body_json filters require a JSONPath key.
    • neq and the not_ operators also match rows where the field or key is missing or null.
    • For attributes, events and JSON bodies, eq, neq, in and not_in also compare values as text, and is_null / is_not_null are accepted with a key.
    • Filter limits are listed.
  • Updates the skill:
    • Consumers are filtered, grouped and joined by identifier. consumers is for custom attributes and the times of a consumer's first and last request.
    • The slow span, error investigation and request-to-span correlation patterns use the sort flags.
    • The consumer activity pattern is removed, as it is now a single filter.

- Add consumer_identifier, consumer_name and consumer_group to request-logs and metrics
- Add request_body_text and response_body_text to request-logs
- Add --sort-by and --sort-direction to request-logs and traces
- Make --since optional for request-logs with a request_uuid filter
- Output consumer_identifier in request-details
- Update filter docs in help texts and the agent skill
- Remove repeated consumer and sorting guidance from the skill
- Remove the consumer activity pattern, now a one-line filter
- State at --limit which rows are kept without sort flags
- Explain when to use the body text and body JSON fields

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 8 files

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Fix all with cubic | Re-trigger cubic

Comment thread skills/apitally-cli/SKILL.md Resolved
Comment thread src/request_details.rs Resolved
Comment thread skills/apitally-cli/SKILL.md Resolved
- request-logs returns consumer_identifier instead of consumer_id by default
- consumers outputs the group as its name instead of an object
- The skill uses the identifier to filter, group and join consumers
Rust 1.100 changed the build directory layout, which cargo-llvm-cov 0.8.5 does not support.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread skills/apitally-cli/SKILL.md Resolved
- A limit returns the oldest rows only without sort flags
- not_exists is not one of the operators that also match missing or null values
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.58824% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.18%. Comparing base (021e0aa) to head (8a6953e).

Files with missing lines Patch % Lines
src/main.rs 0.00% 5 Missing ⚠️
src/request_logs.rs 98.79% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
+ Coverage   92.01%   94.18%   +2.17%     
==========================================
  Files          13       13              
  Lines        2491     2613     +122     
==========================================
+ Hits         2292     2461     +169     
+ Misses        199      152      -47     

☔ 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.

@itssimon
itssimon merged commit 17c4c52 into main Nov 13, 2026
7 checks passed
@itssimon
itssimon deleted the consumer-fields-and-sorting branch November 13, 2026 07:44
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.

1 participant