-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat: Add timeout-setting to Graylog-plugin #10220
Conversation
Thanks so much for the pull request! |
1 similar comment
Thanks so much for the pull request! |
!signed-cla |
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.
@SebastianThorn thanks for the submission. The code looks good. I just have two very minor comments about the option name and ask for your help to add toml-tags to the config-option fields...
plugins/inputs/graylog/graylog.go
Outdated
Servers []string | ||
Metrics []string | ||
Username string | ||
Password string | ||
ResponseTimeout config.Duration |
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.
When you are touching this anyway, can you please add the corresponding toml
tag annotations?
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.
Yes
👍 This pull request doesn't change the Telegraf binary size 📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
@srebhan Does this look better? |
@@ -34,6 +35,7 @@ type GrayLog struct { | |||
Metrics []string | |||
Username string | |||
Password string | |||
Timeout config.Duration |
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.
Can you please add the toml
tags to the struct fields that receive user-options like
Timeout config.Duration | |
Timeout config.Duration `toml:"timeout"` |
This makes it more clear which fields are configured by the user...
The option looks good, I was waiting for the |
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.
Ok looks like we should add the TOML tags later and take what we have.
Looks good to me. Thanks @SebastianThorn for your contribution!
Can one of you please file a bug so we do not forget to go back and do this please? Thanks! |
Required for all PRs:
resolves #10185
I added timeout, but not sure if I did it correctly in regards to a default-vaule. I have not dealt with go before.