-
Notifications
You must be signed in to change notification settings - Fork 45
Adding documentation for analytic-header-filter policy #809
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds two new documentation pages that describe the Analytics Header Filter policy, which configures independent allow/deny lists for request and response headers to be filtered from analytics data; matching is case-insensitive and the policy affects analytics collection only. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 4
🤖 Fix all issues with AI agents
In `@docs/ai-gateway/analytics/analytics-header-filter.md`:
- Around line 98-100: Remove the duplicate heredoc terminator in the example:
there's an extra "EOF" line that ends the block prematurely; edit the markdown
example in analytics-header-filter.md to keep only a single closing heredoc
terminator (remove the second "EOF") so the code block/example is not broken.
- Around line 58-60: The example curl in analytics-header-filter.md uses a
real-looking Basic auth value ("Authorization: Basic YWRtaW46YWRtaW4=") which
decodes to admin:admin; replace that header with a clear placeholder instead
(e.g., "Authorization: Basic <BASE64_ENCODED_CREDENTIALS>" or "Authorization:
Basic <username:password encoded>") so the example in the docs does not contain
real credentials; update the curl example lines with the placeholder token
wherever the Authorization header appears.
- Around line 113-118: The Notes are incorrect about empty `headers` behavior;
update the analytics-header-filter documentation so the `headers` array note
reflects the actual implementation: when `headers` is an empty array the
original headers are returned regardless of the `operation` value (`"allow"` or
`"deny"`). Amend the bullet that currently says empty `"allow"` yields no
headers to explicitly state that an empty `headers` list results in no filtering
and preserves original headers for both `allow` and `deny`, and keep the rest of
the `operation`/`headers` descriptions unchanged.
In `@docs/gateway/analytics/analytics-header-filter.md`:
- Around line 104-109: Update the third bullet under "Notes" to reflect actual
behavior: the `headers` array is required but can be empty, and when it is empty
the implementation returns the original (all) headers regardless of the
`operation` value; thus an empty array results in all headers being included for
both `"allow"` and `"deny"` modes. Mention that header name matching remains
case-insensitive and that `operation` must be `"allow"` or `"deny"`, but clarify
the empty-list fallback as described above to align docs with the
implementation.
Purpose
This PR adds the documentation for the analytics-header-filter policy added for control which request and response headers are included in analytics data using allow or deny modes.
Related to: Implement Analytics specific policy #361
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.