Skip to content

Conversation

Muhammad-Owais-Warsi
Copy link

@Muhammad-Owais-Warsi Muhammad-Owais-Warsi commented Oct 1, 2025

📋 Description

Add advanced event filtering in usage based billing guide

🎯 Type of Change

  • 📝 Documentation update (improving existing docs)
  • ✨ New documentation (adding new guides, API docs, etc.)
  • 🐛 Bug fix (fixing errors, broken links, incorrect information)
  • 🎨 Style/formatting (improving readability, fixing formatting)
  • 🏗️ Structural change (reorganizing content, navigation updates)
  • 🌐 Translation (adding or improving translations)
  • 🖼️ Assets (adding or updating images, diagrams)

📖 What documentation does this PR affect?

  • Getting Started / Setup
  • API Reference
  • Developer Resources
  • Integration Guides
  • Features Documentation
  • External Integrations
  • Changelog
  • Other:

✅ Checklist

  • I have read the Contributing Guidelines
  • I have tested my changes locally with mintlify dev
  • All links are working correctly
  • Images are properly displayed and optimized
  • Code examples are tested and working
  • I have updated the navigation in docs.json (if applicable)
  • My changes follow the project's style guide
  • I have performed a self-review of my changes
  • I have added appropriate frontmatter to new pages

🧪 Testing

  • Verified locally at http://localhost:3000
  • Checked responsive design on mobile viewport
  • Tested all code examples
  • Validated all external links

📸 Screenshots (if applicable)

🔗 Related Issues

Closes #87

📝 Additional Notes

👥 Reviewers

@dodopayments/documentation-team

Summary by CodeRabbit

  • Documentation
    • Added a new guide on advanced event filtering for Usage Based Billing: meter setup, aggregation settings, AND/OR filter examples, validation notes, required fields, and step-by-step instructions with illustrations.
    • Updated site navigation to add the new guide under Developer Resources → Integration Guides.

Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

Adds a new documentation page detailing advanced event filtering for Usage Based Billing and updates the docs navigation to include this page under Developer Resources → Integration Guides. No source code or functional changes.

Changes

Cohort / File(s) Summary of changes
Documentation content
developer-resources/event-filtering-usage-based-billing.mdx
New guide describing meter setup, aggregation settings, and event filtering (AND/OR logic, required fields, examples, UI-like steps, images/frames, and warnings).
Navigation configuration
docs.json
Adds the new page entry developer-resources/event-filtering-usage-based-billing to Developer Resources → Integration Guides pages list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paw at filters bright,
ANDs and ORs aligned just right—
Count the calls, bill what’s true,
Premium paths get carrots too.
Hops through meters, crisp and clear—
Usage tallied—ching!—each month’s cheer. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The new guide introduces advanced event filtering concepts and general AND/OR logic examples but does not include the specific scenarios requested in issue #87, namely charging only successful API calls (status = 200) and applying different billing rules for premium users. Please add concrete examples that demonstrate filtering for successful API calls (status = 200) and configuring separate billing rules for premium user segments to satisfy the issue requirements.
Description Check ⚠️ Warning The PR description follows the template structure with sections for description, type of change, affected pages, checklist, testing, and related issues, but it misidentifies the documentation category by marking Developer Resources instead of Integration Guides. Please update the "What documentation does this PR affect?" section to correctly tick Integration Guides and ensure the category accurately reflects the new guide under Developer Resources.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the addition of the advanced event filtering guide for usage based billing and directly reflects the main change in the pull request.
Out of Scope Changes Check ✅ Passed All changes are confined to adding the new documentation page and updating the docs.json navigation and there are no unrelated or out-of-scope modifications beyond the objectives of the linked issue.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
developer-resources/event-filtering-usage-based-billing.mdx (1)

187-187: Rephrase closing sentence to match second-person voice.

The docs style guide asks us to address readers directly. Consider rewriting the closing line in second person (e.g., “This is how you can implement advanced event filtering...”) to stay consistent.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a83d02c and 4a43c52.

⛔ Files ignored due to path filters (1)
  • images/guides/advanced-event-filtering-ubb/event-filtering.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • developer-resources/event-filtering-usage-based-billing.mdx (1 hunks)
  • docs.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{md,mdx}

📄 CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

Every documentation page must begin with YAML frontmatter containing title and description

Files:

  • developer-resources/event-filtering-usage-based-billing.mdx
**/*.mdx

📄 CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

**/*.mdx: Use clear, direct language appropriate for technical audiences
Write instructions in second person (you)
Use active voice over passive voice
Use present tense for current states and future tense for outcomes
Maintain consistent terminology across documentation
Keep sentences concise while preserving necessary context
Use parallel structure in lists, headings, and procedures
Lead sections with the most important information (inverted pyramid)
Use progressive disclosure: introduce basics before advanced topics
Break complex procedures into numbered steps using /
Include prerequisites and context before instructions
Provide expected outcomes for each major step
End sections with next steps or related information
Use descriptive, keyword-rich headings for navigation and SEO
Focus on user goals and outcomes rather than system features
Anticipate common questions and address them proactively
Include troubleshooting for likely failure points
Provide multiple pathways (beginner vs advanced) when appropriate, with an opinionated recommended path
Use for supplementary information that supports main content
Use for expert advice, shortcuts, or best practices
Use for critical cautions, breaking changes, or destructive actions
Use for neutral background or contextual information
Use for success confirmations or achievement indicators
Use to present the same concept in multiple languages
Provide complete, runnable code examples with language specified and filename when relevant
Include RequestExample/ResponseExample blocks for API endpoint docs
Document API parameters using (path, query, header, body) with types and required/defaults
Document API responses using with names, types, and required flags
Use for nested object properties or hierarchical information
Use / for platform-specific or alternative approaches
Use / for suppl...

Files:

  • developer-resources/event-filtering-usage-based-billing.mdx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
developer-resources/event-filtering-usage-based-billing.mdx (1)

187-187: Rephrase to follow second-person voice.

The closing sentence switches to “we” and adds “events filtering,” breaking the style guide. Keep terminology consistent (“event filtering”) and address the reader directly (e.g., “You’ve implemented…”).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a43c52 and 10cef50.

📒 Files selected for processing (1)
  • developer-resources/event-filtering-usage-based-billing.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{md,mdx}

📄 CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

Every documentation page must begin with YAML frontmatter containing title and description

Files:

  • developer-resources/event-filtering-usage-based-billing.mdx
**/*.mdx

📄 CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

**/*.mdx: Use clear, direct language appropriate for technical audiences
Write instructions in second person (you)
Use active voice over passive voice
Use present tense for current states and future tense for outcomes
Maintain consistent terminology across documentation
Keep sentences concise while preserving necessary context
Use parallel structure in lists, headings, and procedures
Lead sections with the most important information (inverted pyramid)
Use progressive disclosure: introduce basics before advanced topics
Break complex procedures into numbered steps using /
Include prerequisites and context before instructions
Provide expected outcomes for each major step
End sections with next steps or related information
Use descriptive, keyword-rich headings for navigation and SEO
Focus on user goals and outcomes rather than system features
Anticipate common questions and address them proactively
Include troubleshooting for likely failure points
Provide multiple pathways (beginner vs advanced) when appropriate, with an opinionated recommended path
Use for supplementary information that supports main content
Use for expert advice, shortcuts, or best practices
Use for critical cautions, breaking changes, or destructive actions
Use for neutral background or contextual information
Use for success confirmations or achievement indicators
Use to present the same concept in multiple languages
Provide complete, runnable code examples with language specified and filename when relevant
Include RequestExample/ResponseExample blocks for API endpoint docs
Document API parameters using (path, query, header, body) with types and required/defaults
Document API responses using with names, types, and required flags
Use for nested object properties or hierarchical information
Use / for platform-specific or alternative approaches
Use / for suppl...

Files:

  • developer-resources/event-filtering-usage-based-billing.mdx

@whitesideofthesun
Copy link
Collaborator

whitesideofthesun commented Oct 7, 2025

@Muhammad-Owais-Warsi
Advanced event filtering should use multi group case and include use case for those.
Please rework on this one.

@Muhammad-Owais-Warsi
Copy link
Author

can you please elaborate more on this.

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.

[Feature]: Advanced Guide – Event Filtering & Complex Conditions in UBB
2 participants