-
Notifications
You must be signed in to change notification settings - Fork 817
feat: Added support for logging of HTTP Headers #4803
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
Conversation
Signed-off-by: Zach Speaks <zspeaks@amazon.com>
Signed-off-by: Zach Speaks <zspeaks@amazon.com>
@zspeaks can you also share an example how the actual log looks like? |
Signed-off-by: Zach Speaks <zspeaks@amazon.com>
0926efb
to
a2f4d2c
Compare
…erLogging # Conflicts: # CHANGELOG.md
Signed-off-by: Zach Speaks <zspeaks@amazon.com>
Added Header Propagation to Ingester and Querier Signed-off-by: Zach Speaks <zspeaks@amazon.com> Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zach Speaks <zspeaks@amazon.com> Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zach Speaks <zspeaks@amazon.com> Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
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.
LGTM.
Just remember to update changelog
…vice is not being used Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
…th existing code Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
pkg/util/log/log.go
Outdated
func InjectHeadersIntoHTTPRequest(headerMap map[string]string, request *http.Request) { | ||
for header, contents := range headerMap { | ||
request.Header.Add(HeaderPropagationStringForRequestLogging, header) | ||
request.Header.Add(HeaderPropagationStringForRequestLogging, contents) | ||
} | ||
} |
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.
Could we pass the headers as is
instead of creating a special header (httpheaderforwardingforlogging
)?
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Signed-off-by: Zachary Speaks <zspeaks@amazon.com>
Nice!! |
What this PR does:
Adds support for the addition of the contents of HTTP headers to logs.
Which issue(s) this PR fixes:
Fixes #4799
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]