Hi,
I'm new to the metrics scene so pardon my ignorance.
I've got java application that I want to expose some custom metrics for.
Within it I have a MBean with some basic information and the JMX Exporter
is setup to expose that data. Everything works fine when I'm using basic
types like integers or doubles but if I want to expose the metrics with
labels then I'm finding it doesn't work. The way I'm exposing them,
however, is by using List<Collector.MetricFamilySamples>, is that the
correct way?
For example, I register the meter like so:
resourcesIgnored = Counter.build("resources_ignored", "Number of resources
ignored").labelNames("type").register();
and to increment I do this:
resourcesIgnored.labels(type).inc();
In the MBean to expose it I have the following code:
return resourcesIgnored.collect();
which returns a List of MetricFamilySamples.
The result is that the exporter doesn't return this in the end scrape.
If I change to List<Collector.MetricFamilySamples.Sample> by returning
resourcesIgnored.collect().get(0).samples then I get the same, nothing is
returned.
Is there a way I can get metrics that have labels exported?
Thanks
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/ff6e9890-f537-4fa6-8e00-075583329daen%40googlegroups.com.