Skip to content

Fix stats query params: sending_streams[] and add --esps filter#4

Merged
solovey23 merged 1 commit intomailtrap:mainfrom
solovey23:fix/stats-query-params
Apr 21, 2026
Merged

Fix stats query params: sending_streams[] and add --esps filter#4
solovey23 merged 1 commit intomailtrap:mainfrom
solovey23:fix/stats-query-params

Conversation

@solovey23
Copy link
Copy Markdown
Contributor

Summary

  • Fix stats get: wrong query param streams[]sending_streams[] — the filter was being silently ignored by the API, so --streams transactional returned unfiltered results identical to no filter at all
  • Add missing --esps flag (email_service_providers[]) to all 5 stats commands: get, by-domain, by-category, by-esp, by-date
  • Improve --streams flag description to clarify valid values (transactional, bulk)

Test plan

  • mailtrap stats get --start-date 2026-03-07 --end-date 2026-04-07 --streams transactional returns different results than without --streams
  • mailtrap stats get --start-date 2026-03-07 --end-date 2026-04-07 --esps Google filters by ESP correctly
  • Same filters work on by-domain, by-category, by-esp, by-date

🤖 Generated with Claude Code

- Fix stats get: wrong param name streams[] → sending_streams[] (was
  silently ignored by the API, making --streams filter have no effect)
- Add --esps flag (email_service_providers[]) to all 5 stats commands:
  get, by-domain, by-category, by-esp, by-date
- Improve --streams flag description to clarify valid values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@solovey23 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 42 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 35 minutes and 42 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18007ba5-4c40-4fb4-8af0-ab38f23e9321

📥 Commits

Reviewing files that changed from the base of the PR and between aced56e and eddab9a.

📒 Files selected for processing (5)
  • internal/commands/stats/by_category.go
  • internal/commands/stats/by_date.go
  • internal/commands/stats/by_domain.go
  • internal/commands/stats/by_esp.go
  • internal/commands/stats/get.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@solovey23 solovey23 merged commit 112faa9 into mailtrap:main Apr 21, 2026
2 checks passed
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