-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
446fb5a
to
911eb0a
Compare
agent/receiver.go
Outdated
r.Listen(addr) | ||
|
||
legacyAddr := fmt.Sprintf("%s:%d", r.conf.ReceiverHost, legacyReceiverPort) | ||
r.Listen(legacyAddr) |
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.
As I understand it, if 7777 is already binded, here, the agent won't start, and the user has no real way to change the port and/or discard it. Technically, a customer installing this version of the agent for the first time would need to clear port 7777 whatever happens, while we would probably not use it for real. Maybe only log an error in that case? OTOH such an agent could silently run along with an old deprecated one.
911eb0a
to
55de123
Compare
i'd like us to emit a metric or log something when we see requests come in on the legacy port. this gives us some idea of when we can yank the legacy listener altogether. |
I can add a metric for this if you wish, but I'm not sure it's that useful. As long as the port 7777 is available, those who use it will continue to do so because there is no incentive not to. If you want to make people use the new port, you have to actively do it (i.e. mark the old one as deprecated for the next stable version, then remove it for the one after that). |
55de123
to
ea7819a
Compare
panic() should not be used for errors whose cause is expected. For example, if a configuration file cannot be loaded, we know what is happening and why. Therefore the backtrace is useless and gives the impression that the software is crashing, even though this is a perfectly fine exit.
It's not that obvious that we ignore the entire file when there is something wrong with it.
ea7819a
to
b88cce2
Compare
No description provided.