-
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
Configuration documentation improvements #2318
Conversation
e6f009a
to
4901f73
Compare
pkg/logql/engine.go
Outdated
@@ -67,6 +68,11 @@ type EngineOpts struct { | |||
MaxLookBackPeriod time.Duration `yaml:"max_look_back_period"` | |||
} | |||
|
|||
func(opts *EngineOpts) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { | |||
f.DurationVar(&opts.Timeout, prefix+".engine.timeout", 3*time.Minute, "Timeout for query execution") | |||
f.DurationVar(&opts.MaxLookBackPeriod, prefix+".engine.max-lookback-period", 30*time.Second, "MaxLookBackPeriod is the maximum amount of time to look back for log lines. Used only for instant log queries") |
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.
This default is probably too short for a default, what is the behavior now, do we just support infinite lookback if you don't define this?
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.
This is only usde for instant log queries. It was already the default but we could change it to 5m if you want.
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.
5m seems more reasonable to me as a default I think 👍
Initially I was hesitant to make the breaking changes to the command line configs, but these are pretty obscure configs and I think this is fine 👍 always better to do this stuff sooner than later. |
4fc197f
to
9a2ab80
Compare
Codecov Report
@@ Coverage Diff @@
## master #2318 +/- ##
==========================================
- Coverage 61.50% 61.47% -0.04%
==========================================
Files 160 160
Lines 13422 13426 +4
==========================================
- Hits 8255 8253 -2
- Misses 4546 4551 +5
- Partials 621 622 +1
|
I think the only thing I'd like to see added to this is an entry in the operations/upgrade guide explaining the config changes! |
9a2ab80
to
de01ec9
Compare
24ac793
to
0d838b3
Compare
0d838b3
to
fad3a83
Compare
e70ea84
to
b3744df
Compare
b3744df
to
fe0485a
Compare
I think this looks great, but please avoid force pushing if not necessary. It's difficult to see incremental changes introduced by successive commits/edits. |
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 PR, thanks.
I did some blunder while rebasing, that's the reason you see many force pushes here. Sorry for that |
What this PR does / why we need it:
This is an attempt to improve the
configuration
doc. This PR also updates cortex to master