-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow specifying custom headers for Loki log output #3227
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3227 +/- ##
==========================================
- Coverage 73.18% 73.10% -0.09%
==========================================
Files 259 257 -2
Lines 19864 19890 +26
==========================================
+ Hits 14538 14541 +3
- Misses 4404 4420 +16
- Partials 922 929 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Thanks for the PR 🙇
LGTM in general, but some comments!
I have a single requested change.
But I also would prefer if we can get a small test that actually checks this.
The last test in loki_test.go starts a test server already so you can copy it and check the correct headers are send.
What?
Allows users to specify custom headers for the
loki
log output option. For example:In this case, requests done to
example.org
will contain the HTTP headersX-My-Header: 123
andAuthorization: mytoken
.Why?
See issue #3216 and backlinked issue from the Grafana private repository.
Checklist
make ci-like-lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)
#3216
#3224 (this PR implements the other half of #3216)