etsy / statsd-jvm-profiler

Simple JVM Profiler Using StatsD and Other Metrics Backends
MIT License
330 stars 93 forks source link

Missing hostname in metric #48

Closed wnds closed 7 years ago

wnds commented 7 years ago

Hostname's are missing in metrics being generated. If plugin is deployed on multiple jvm's across hosts and data is fed into same statsd instance then metrics are not useful due to overlap.

AlejandroRivera commented 7 years ago

@mail2vks: you can use the prefix global option to include the hostname if that's what you want. It would be close to impossible to foresee all potential requirements from different people/organizations regarding how they want their metrics generated. You asked for hostname. Someone might ask for hostname + datacenter. Some might ask for a Docker container name + hostname + datacenter. You get the idea...

wnds commented 7 years ago

@AlejandroRivera Agree with you. I added changes to pass hostname in prefix by resolving hostname from env. variables like prefix=server-$(hostname)