Skip to content

Improve error reporting upon inconsistent metrics #52

Description

@BigCrunsh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions