-
Notifications
You must be signed in to change notification settings - Fork 487
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
Part I: converting promtail configs to flow mode #4160
Conversation
258a183
to
e294abc
Compare
e483a87
to
ee57df7
Compare
2821fca
to
784d3f7
Compare
2a21da0
to
03a5e6a
Compare
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.
I looked at this from the output of the conversion; mostly looks good! I only have one real question with a few small nits.
loki.source.journal "fun" { | ||
format_as_json = true | ||
max_age = "20h0m0s" | ||
relabel_rules = null |
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.
It's a little surprising that this is getting written out 🤔
converter/internal/promtailconvert/testdata/source_pipeline_example.river
Outdated
Show resolved
Hide resolved
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.
Great start to this new converter!
Heads up, I did modify how the prometheus validation is organized so your changes to prometheus converter code may cause a little merge weirdness. Hopefully it's not too bad since you were mostly just making some functionality public.
@@ -19,7 +19,7 @@ type ConvertAppendable struct { | |||
|
|||
var _ storage.Appendable = (*ConvertAppendable)(nil) | |||
var _ builder.Tokenizer = ConvertAppendable{} | |||
var _ river.Capsule = ConvertTargets{} | |||
var _ river.Capsule = ConvertAppendable{} |
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 catching ❤️
Yes, I'm aware - that's the reason I didn't move the exported methods to the top of the file as one would typically do - I wanted to reduce merge issues. Feel free to refactor as you see fit though :) |
328d93b
to
2fe4f2e
Compare
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, great start!
2fe4f2e
to
7fa2d8f
Compare
PR Description
This sets up foundations for the promtail configuration conversion to flow mode configuration.
There is some work remaining, but to limit the size of the PR, I am implementing only some features. Specifically, what is remaining is:
Notes to the Reviewer
There are two main kinds of pipelines that this supports:
source_pipeline_example.river
test - for example:loki.source.journal -> loki.process -> loki.write
with relabel rules directly passed toloki.source.journal
.loki.source.cloudflare
, so there is an extraloki.relabel
added. Seecloudflare_relabel.river
test.sd_pipeline_example.river
test - for example:discovery.kubernetes -> discovery.relabel -> discovery.file -> loki.source.file -> loki.process -> loki.write
.PR Checklist