-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Promtail: Loki Push API #2296
Promtail: Loki Push API #2296
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2296 +/- ##
==========================================
+ Coverage 60.99% 61.26% +0.26%
==========================================
Files 158 158
Lines 12751 12799 +48
==========================================
+ Hits 7778 7841 +63
+ Misses 4390 4364 -26
- Partials 583 594 +11
|
// Stop shuts down the PushTarget. | ||
func (t *PushTarget) Stop() error { | ||
level.Info(t.logger).Log("msg", "stopping push server", "job", t.jobName) | ||
t.server.Shutdown() |
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.
Wanted to add a note, not sure here if it's worth having a waitgroup on the server thread and wait for it before returning here?
Now that Promtail acts as server for incoming logs, I think we should have a plan to handle Promtail crash. |
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.
A few comments then LGTM.
Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
What this PR does / why we need it:
This PR implements the Loki push API in promtail, allowing clients (including promtail) to send to another promtail instance which can then send to Loki (or even more promtails, infinite promtails!)
The original design for this was approved with #1627, this is the implementation of that design.
Which issue(s) this PR fixes:
Fixes #1576
Checklist