-
Notifications
You must be signed in to change notification settings - Fork 637
ref(integrations): route HTTP header filtering through data collection config #6788
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: master
Are you sure you want to change the base?
Changes from all commits
7541460
5e9f610
a590c8e
16ed0c8
486f0bc
7d14a81
bb98334
61d1618
951c408
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,9 +115,13 @@ def _get_request_data( | |
| if ty in ("http", "websocket"): | ||
| request_data["method"] = asgi_scope.get("method") | ||
|
|
||
| request_data["headers"] = headers = _filter_headers( | ||
| _get_headers(asgi_scope), | ||
| headers = _get_headers(asgi_scope) | ||
|
|
||
| request_data["headers"] = _filter_headers( | ||
| headers, | ||
| use_annotated_value=False, | ||
|
Comment on lines
+118
to
+122
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change was done because when if the headers are filtered with "allowlist" and no terms are provided, and the "host" header is present, then the constructed URL in Doing this ensures that it gets filtered from the headers to respect data collection, but still correctly appears in the url |
||
| ) | ||
|
|
||
| request_data["query_string"] = _get_query(asgi_scope) | ||
|
|
||
| request_data["url"] = _get_url( | ||
|
|
@@ -148,8 +152,10 @@ def _get_request_attributes( | |
| if asgi_scope.get("method"): | ||
| attributes["http.request.method"] = asgi_scope["method"].upper() | ||
|
|
||
| headers = _filter_headers(_get_headers(asgi_scope), use_annotated_value=False) | ||
| for header, value in headers.items(): | ||
| headers = _get_headers(asgi_scope) | ||
|
|
||
| filtered_headers = _filter_headers(headers, use_annotated_value=False) | ||
| for header, value in filtered_headers.items(): | ||
| attributes[f"http.request.header.{header.lower()}"] = value | ||
|
|
||
| if should_send_default_pii(): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.