Skip to content

Add --sample arg to request-logs command#22

Merged
itssimon merged 3 commits into
mainfrom
dev-102-add-a-sample-arg-to-the-request-logs-command-in-cli
Apr 16, 2026
Merged

Add --sample arg to request-logs command#22
itssimon merged 3 commits into
mainfrom
dev-102-add-a-sample-arg-to-the-request-logs-command-in-cli

Conversation

@itssimon
Copy link
Copy Markdown
Member

@itssimon itssimon commented Apr 16, 2026

Summary by cubic

Adds a --sample option to the request-logs command in @apitally/cli to fetch an approximate sample by size or rate for faster, cheaper analyses. Addresses DEV-102.

  • New Features
    • --sample <n|rate> accepts an integer size (n > 0) or a float rate (0 < rate <= 0.5).
    • Validates input, forwards sample in the API request body, and adds tests for integer and float sampling.
    • Updates CLI help and docs to include the new flag and usage.

Written for commit d20e8be. Summary will update on new commits.

@itssimon itssimon self-assigned this Apr 16, 2026
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/request_logs.rs">

<violation number="1" location="src/request_logs.rs:86">
P2: Reject non-finite `--sample` float values before serializing to JSON.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread src/request_logs.rs Outdated
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.17%. Comparing base (0fa2953) to head (d20e8be).

Files with missing lines Patch % Lines
src/request_logs.rs 89.36% 5 Missing ⚠️
src/main.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   91.31%   91.17%   -0.14%     
==========================================
  Files          12       12              
  Lines        1935     1984      +49     
==========================================
+ Hits         1767     1809      +42     
- Misses        168      175       +7     

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

@itssimon itssimon merged commit 0d8b815 into main Apr 16, 2026
4 of 6 checks passed
@itssimon itssimon deleted the dev-102-add-a-sample-arg-to-the-request-logs-command-in-cli branch April 16, 2026 07: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.

1 participant