Hi,
Thanks for the custom mapper config on the dropwizard export. It makes creating tags really easy ❤️
I found a restriction in the regex that makes it impossible for me to create a certain configuration. : are not allowed and we have metrics that contain ip:port in the metric name.
|
static final String METRIC_GLOB_REGEX = "^(\\*\\.|" + METRIC_PART_REGEX + "\\.)+(\\*|" + METRIC_PART_REGEX + ")$"; |
This is what the mapper config would look like
// this port is dynamically set from the outside
final int httpPort = 8080
final MapperConfig vertxServerHttp = new MapperConfig(
// the IP address is always 0.0.0.0
"vertx.http.servers.0.0.0.0:" + httpPort + ".*", "vertx.http.servers.${4}",
ImmutableMap.of("endpoint", "http")
);
So the metric currentely ends up like this in prometheus
vertx_http_servers_0_0_0_0:8080_metric
which gets messy as ports change.
Suggestion
Add : to the global regex.
I don't know what implications this would have
Hi,
Thanks for the custom mapper config on the dropwizard export. It makes creating tags really easy ❤️
I found a restriction in the regex that makes it impossible for me to create a certain configuration.
:are not allowed and we have metrics that containip:portin the metric name.client_java/simpleclient_dropwizard/src/main/java/io/prometheus/client/dropwizard/samplebuilder/MapperConfig.java
Line 25 in 29dfd0a
This is what the mapper config would look like
So the metric currentely ends up like this in prometheus
which gets messy as ports change.
Suggestion
Add
:to the global regex.I don't know what implications this would have