If a registry containing metrics with duplicate names is pushed, a 500 is returned:
CollectorRegistry pushRegistry = new CollectorRegistry();
Gauge g1 = (Gauge) Gauge.build().name("g1").help("blah1").register(pushRegistry);
Gauge g2 = (Gauge) Gauge.build().name("g1").help("blah2").register(pushRegistry);
PushGateway pg = new PushGateway(address)
pg.push(pushRegistry, "job", "instance");
The error is not meaningful and I actually would expect that an error is thrown already when registering gauge g2.
This is related to Issue 14 in the prometheus/pushgateway repo.
If a registry containing metrics with duplicate names is pushed, a 500 is returned:
The error is not meaningful and I actually would expect that an error is thrown already when registering gauge g2.
This is related to Issue 14 in the prometheus/pushgateway repo.