Skip to content

Conversation

@aletourneau
Copy link

@aletourneau aletourneau commented Oct 31, 2025

Corresponds to: fluent/fluent-bit#11080

Summary by CodeRabbit

  • New Features

    • Added add_remote_addr option to the HTTP input to populate a REMOTE_ADDR field from X-Forwarded-For, handling single vs. multiple header values and HTTP/2 behavior.
  • Documentation

    • Updated HTTP input docs with configuration guidance, usage examples and curl test commands for the new option.

✏️ Tip: You can customize this high-level summary in your review settings.

Copy link
Contributor

@esmerel esmerel left a comment

Choose a reason for hiding this comment

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

My suggestions are stylistic for page consistency. They're fairly minor. This looks good to me otherwise, but should have a technical review for final approval.

@aletourneau aletourneau force-pushed the in_http/add_remote_addr branch from bc93bab to 867a1fb Compare November 3, 2025 21:07
@eschabell eschabell added the waiting-on-review Waiting on a review from mainteners label Nov 4, 2025
@eschabell eschabell self-assigned this Nov 4, 2025
Copy link
Contributor

@patrick-stephens patrick-stephens left a comment

Choose a reason for hiding this comment

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

Seems ok, waiting on code merge.

@patrick-stephens patrick-stephens removed the waiting-on-review Waiting on a review from mainteners label Nov 5, 2025
@eschabell eschabell added 4.2.1 conflict Waiting on conflict to be resolved by contributor and removed 4.2.1 labels Dec 3, 2025
@lecaros
Copy link
Contributor

lecaros commented Dec 18, 2025

hi @aletourneau we're ready to merge the code PR and this one. Thanks for your contribution!
Could you please resolve the conflict?

@aletourneau
Copy link
Author

hi @aletourneau we're ready to merge the code PR and this one. Thanks for your contribution! Could you please resolve the conflict?

Yes, wasn't aware there was a conflict, I'll take a look, thank you for notifying me.

@aletourneau aletourneau force-pushed the in_http/add_remote_addr branch from 867a1fb to 17cb08f Compare December 18, 2025 18:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

This change adds add_remote_addr (default: false) to the HTTP input documentation, describing how REMOTE_ADDR is derived from X-Forwarded-For (behavior for single vs. multiple headers and http2), and adds configuration and curl examples for testing.

Changes

Cohort / File(s) Summary
HTTP Input Documentation
pipeline/inputs/http.md
Introduces the add_remote_addr config option (default: false); documents behavior with single and multiple X-Forwarded-For headers and http2, and adds example fluent-bit.yaml / fluent-bit.conf snippets plus curl test commands.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Focus areas: confirm wording accurately reflects header-selection logic for single/multiple X-Forwarded-For and http2, and verify example configs and curl commands execute as documented.

Poem

🐰 I nibble headers in the dew,
REMOTE_ADDR now hops into view,
X-Forwarded-For I gently trace,
Examples ready, curl in place,
A tiny doc-hop — clever and new! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely describes the main change: adding the add_remote_addr configuration option to the HTTP input plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17cb08f and 55e9682.

📒 Files selected for processing (1)
  • pipeline/inputs/http.md (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pipeline/inputs/http.md

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.

@aletourneau
Copy link
Author

@lecaros The conflict is now resolved.

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

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e21b77 and 17cb08f.

📒 Files selected for processing (1)
  • pipeline/inputs/http.md (3 hunks)
🔇 Additional comments (3)
pipeline/inputs/http.md (3)

8-19: Configuration table looks good.

The addition of add_remote_addr to the configuration parameters table is well-documented with a clear description and correct default value.


45-70: Documentation of add_remote_addr feature is clear and well-structured.

The explanation effectively covers the single header case and demonstrates the behavior with multiple X-Forwarded-For headers, showing how the http2 config affects which value is used. The table comparing http2 config values to the resulting REMOTE_ADDR value is helpful.


191-230: Configuration examples and curl test command are helpful.

The YAML and CONF format examples (aside from the capitalization issue flagged separately) and the curl test command provide good practical guidance for users wanting to enable this feature.

Once you fix the CONF format capitalization issue on lines 212–217, please verify that the examples work end-to-end with the corresponding code changes in the fluent-bit repository PR.

Signed-off-by: Alexandre Létourneau <[email protected]>
@aletourneau aletourneau force-pushed the in_http/add_remote_addr branch from 17cb08f to 55e9682 Compare December 18, 2025 19:11
@aletourneau
Copy link
Author

Note: addressed the capitalization concern raised by coderabbitai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict Waiting on conflict to be resolved by contributor waiting-on-code-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants