Hello,

Not sure why I get a NPE when setting the `labelNames`, I'm able to provide 
labels just fine using the REST API directly but not with the Java Client, 
skipping the labels in Java does work fine as well, what gives ?

        CollectorRegistry registry = new CollectorRegistry();
        final Gauge duration = Gauge.build()
                .name(metricName)
                .labelNames("l1", "l2")
                .help("Duration in seconds.")
                .register(registry)
        Gauge.Timer durationTimer = duration.startTimer();


java.lang.NullPointerException
at io.prometheus.client.Gauge.startTimer(Gauge.java:283)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e118ee16-a6d4-4bdf-bb9e-30a7ab461023n%40googlegroups.com.

Reply via email to