-
Notifications
You must be signed in to change notification settings - Fork 451
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
chore: do not log error when receiver has no endpoint #1666
chore: do not log error when receiver has no endpoint #1666
Conversation
Some receivers don't have an `endpoint` config value. No need to log a type error for these.
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 looks good to me, but I wonder if we should then not really also change the log level to error instead of info, if the endpoint is neither non existent (nil
) nor string.
Great idea. See follow-on commit. |
switch endpoint := endpoint.(type) { | ||
switch e := endpoint.(type) { | ||
case nil: | ||
break |
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.
We can omit this break
, but I understand if it was added for readability.
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.
Right. There are a few ways to make this functional change, but this seemed the most readable.
…#1666) * chore: do not log error when receiver has no endpoint Some receivers don't have an `endpoint` config value. No need to log a type error for these. * chore: integrate review feedback
Some receivers don't have an
endpoint
config value. No need to log a type error for these.FWIW, setting
endpoint: :1
quiets the log, but causes the Kafka receiver to fail to unmarshal its config.