Skip to content
Snippets Groups Projects
Commit 88c4b2be authored by Jon Chambers's avatar Jon Chambers Committed by Jon Chambers
Browse files

Correct a misunderstanding about the metrics host tag.

parent 6cbd57f1
No related branches found
No related tags found
No related merge requests found
...@@ -275,7 +275,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration ...@@ -275,7 +275,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
}); });
{ {
final String host; final String hostname;
{ {
String localHostName = "unknown"; String localHostName = "unknown";
...@@ -285,7 +285,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration ...@@ -285,7 +285,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
} catch (final UnknownHostException ignored) { } catch (final UnknownHostException ignored) {
} }
host = localHostName; hostname = localHostName;
} }
final DatadogMeterRegistry datadogMeterRegistry = new DatadogMeterRegistry(new DatadogConfig() { final DatadogMeterRegistry datadogMeterRegistry = new DatadogMeterRegistry(new DatadogConfig() {
...@@ -306,13 +306,14 @@ public class WhisperServerService extends Application<WhisperServerConfiguration ...@@ -306,13 +306,14 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
@Override @Override
public String hostTag() { public String hostTag() {
return host; return "host";
} }
}, Clock.SYSTEM); }, Clock.SYSTEM);
datadogMeterRegistry.config().commonTags( datadogMeterRegistry.config().commonTags(
Tags.of( Tags.of(
"service", "chat", "service", "chat",
"host", hostname,
"version", WhisperServerVersion.getServerVersion(), "version", WhisperServerVersion.getServerVersion(),
"env", config.getDatadogConfiguration().getEnvironment())) "env", config.getDatadogConfiguration().getEnvironment()))
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.REQUEST_COUNTER_NAME)) .meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.REQUEST_COUNTER_NAME))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment