-
Notifications
You must be signed in to change notification settings - Fork 543
Add comprehensive documentation for both tag-based routing and the new conditional routing feature. Fixes #2199. #2200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comprehensive documentation for both tag-based routing and the new conditional routing feature. Fixes #2199. #2200
Conversation
…. Applies to #2139. Signed-off-by: Eric D. Schabell <[email protected]>
…. Applies to #2139. Signed-off-by: Eric D. Schabell <[email protected]>
Signed-off-by: Eric D. Schabell <[email protected]>
Add comprehensive documentation for both tag-based routing and the new conditional routing feature introduced in Fluent Bit 4.0. - Document tag-based routing with basic matching, wildcards, and regex - Document conditional routing with per-record evaluation - Include comparison operators and condition syntax - Add examples for routing by severity, service name, and regex patterns - Provide guidance on choosing between routing approaches Fixes #2199. Signed-off-by: Eric D. Schabell <[email protected]>
WalkthroughReworks Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Source as Data source
participant Router as Router docs
participant TagMatch as Tag matcher
participant CondEval as Condition evaluator
participant Output as Output plugins
rect rgb(250,250,240)
note left of Router `#f7f3c6`: Tag-based routing (chunk-level)
Source->>Router: emit chunk (tag + records)
Router->>TagMatch: match by tag / wildcard / regex
alt tag matched
TagMatch->>Output: route whole chunk to outputs
else no tag match
TagMatch-->>Router: pass to conditional routing phase
end
end
rect rgb(240,250,250)
note left of Router `#e6f7f7`: Conditional routing (per-record)
Router->>CondEval: evaluate `routes` block per record
loop per record
CondEval->>CondEval: evaluate condition(s) & operators
alt condition true
CondEval->>Output: send record to specified outputs (may include multiple)
else condition false
CondEval-->>Router: try next route or default route
end
end
end
Note right of Output: Outputs may receive whole chunks (tag-based) or individual records (conditional)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (14)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pipeline/router.md(5 hunks)
🧰 Additional context used
🪛 GitHub Check: runner / vale
pipeline/router.md
[warning] 516-516:
[vale] reported by reviewdog 🐶
[FluentBit.Simplicity] Avoid words like "Simple" that imply ease of use, because the user may find this action difficult.
Raw Output:
{"message": "[FluentBit.Simplicity] Avoid words like "Simple" that imply ease of use, because the user may find this action difficult.", "location": {"path": "pipeline/router.md", "range": {"start": {"line": 516, "column": 3}}}, "severity": "WARNING"}
🪛 LanguageTool
pipeline/router.md
[style] ~248-~248: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ...value | The value to compare against. Can be a single value or an array for in ...
(MISSING_IT_THERE)
🔇 Additional comments (4)
pipeline/router.md (4)
7-10: Strong introduction clarifying routing mechanisms.The opening clearly distinguishes tag-based routing (chunk-level) from conditional routing (record-level), setting appropriate expectations for both approaches.
26-170: Well-organized tag-based routing documentation.The section provides clear progression from basic matching through wildcards to regex patterns. Examples are consistent, complete, and effectively demonstrate each concept.
171-279: Comprehensive conditional routing parameter documentation.The section effectively introduces the feature, explains evaluation mechanics, provides clear configuration syntax, and documents all parameters, operators, and signal types. The version requirement notice is helpful.
280-503: Well-designed, progressively complex examples.The four examples effectively demonstrate conditional routing from simple field matching through regex patterns. Each includes realistic output configurations and clear explanations of routing behavior.
Signed-off-by: Eric D. Schabell <[email protected]>
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pipeline/router.md(5 hunks)
🧰 Additional context used
🪛 LanguageTool
pipeline/router.md
[grammar] ~248-~248: Ensure spelling is correct
Context: ...parison operator. | | value | This is thee value to compare against. It can be a s...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (5)
pipeline/router.md (5)
7-11: Excellent documentation structure for dual routing mechanisms.The introduction clearly and concisely explains the two routing approaches available in Fluent Bit. The distinction between tag-based (traditional, chunk-level) and conditional (per-record, content-based) routing helps users understand which to use. The bullet points are well-written and accessible.
26-169: Comprehensive tag-based routing documentation with clear progression.The section effectively covers tag-based routing fundamentals through three increasingly advanced subsections: basic matching, wildcards, and regular expressions. Each subsection includes both YAML and Conf configuration examples, making the documentation accessible to users with different configuration preferences. The explanatory text is concise and links to the mermaid diagram appropriately.
171-278: Well-structured conditional routing core section with comprehensive parameter documentation.The record accessor syntax documentation correctly references the feature for accessing fields inside logs, and the link to the record accessor reference page is helpful. The parameter tables (route configuration, condition rules, comparison operators, signal types) are thorough and well-organized. The version constraint correctly specifies that conditional routing is available in Fluent Bit version 4.0 and greater.
279-503: Excellent practical examples demonstrating progressive complexity and real-world scenarios.The four examples (severity routing, service name routing, multiple conditions, regex matching) effectively demonstrate different use cases and progressively increase in complexity. Each example uses complete, executable YAML configurations with actual output aliases and plugin names. The explanatory text after each example clearly articulates the behavior and intent.
505-518: Helpful comparison table for routing approach selection.The table effectively guides users in choosing between tag-based and conditional routing by presenting practical use cases. The guidance about combining both approaches in line 518 is valuable for users building complex pipelines.
Signed-off-by: Eric D. Schabell <[email protected]>
There was a problem hiding this 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)
pipeline/router.md (1)
268-277: Consider demonstrating signal type routing with examples.The Signal types section (lines 268-277) lists four distinct signal types (
logs,metrics,traces,any) that can be routed separately. However, all five examples in the document only demonstratelogs:routing.While the structure is intuitive (users would likely infer that
metrics:andtraces:work similarly), adding even a brief example or clarifying note about how to route metrics or traces would improve completeness. For instance, a note like "The same route structure applies tometrics:andtraces:signal types" would set clearer expectations.
Signed-off-by: Eric D. Schabell <[email protected]>
Add conditional routing examples for metrics and traces signals: - Route metrics by name pattern (CPU, memory metrics) - Route traces by service name and span attributes - Route multiple signal types (logs, metrics, traces) in one config Signed-off-by: Eric D. Schabell <[email protected]>
|
Passed AI review (whew!), merging with good updates to the routing docs. |
Add comprehensive documentation for both tag-based routing and the new conditional routing feature introduced in Fluent Bit 4.0. Fixes #2199.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.