-
Notifications
You must be signed in to change notification settings - Fork 39
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(sumologicextension): use hostname as default collector name #918
Conversation
2d69b2b
to
fefd3d1
Compare
fefd3d1
to
25c57d1
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.
Should we clobber by default then?
I think the default behaviour is better in this case. Clobber would actually delete the existing collector, which is a destructive action I'd rather not do without explicit user opt-in. Maybe we should log a warning in this case? |
25c57d1
to
ec50e64
Compare
I added it. |
if collectorName != resp.CollectorName { | ||
se.logger.Warn("Collector name already in use, registered modified name", zap.String("registered_name", resp.CollectorName)) | ||
} | ||
|
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.
Nice, but not sure if we should mention clobber
or any documentation here
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.
Hm, I probably should add this behaviour to the documentation to begin with. I don't want to make this log message too long.
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.
Updated documentation.
ec50e64
to
43fed5d
Compare
This ends up causing more problems than it solves. In most circumstances the hostname is unique, and where it isn't, the user should set the collector name explicitly. And just using the hostname makes the user experience in the majority of cases better.