ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.22k stars 397 forks source link

Cannot identify server from metrics #183

Open devgianlu opened 5 years ago

devgianlu commented 5 years ago

It is very difficult to identify the server that hosted a given session from just the SessionId. I don't know how this could be fixed; logging the server domain is too invasive?

ajanata commented 5 years ago

The first part of the metrics IDs should be the server's hostname, if Java is able to figure it out. It does work for me on Windows 10 and Ubuntu 16.04, at least. I suppose it could also be made configurable.

devgianlu commented 5 years ago

For example, these servers (https://zy-a.us.notrly.xyz and https://zy-a.apac.notrly.xyz) use xyz and cah as prefixes for the SessionId; not very singular. I don't have any clue on how to do this without the user changing the configuration file.

ajanata commented 5 years ago

It really only matters if servers with conflicting hostnames use the same kafka/postgres metrics store. Users would have to configure the name setting in the properties file if the machine's hostname isn't acceptable, but they'd have to configure that it should be doing metrics logging in the first place anyway, so I don't really see that as much additional burden. I will go ahead and make the name configurable, though.

Hopefully tomorrow.

ajanata commented 4 years ago

Hopefully tomorrow.

famous last words...