-
Notifications
You must be signed in to change notification settings - Fork 822
Open
Description
Hi Team! We are migrating our project from micrometer-registry-prometheus:1.12.8
to version 1.13.8
. I see that the io.prometheus:simpleclient:jar:0.16.0
has been deprecated.
We have few scenarios which I do not see in the migration guide.
Here are few scenarios,
- What is the equivalent of
io.prometheus.client.Collector.MetricFamilySamples
and theMetricFamilySamples.Sample
PrometheusMeterRegistry instance = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
MetricFamilySamples samples = instance.getPrometheusRegistry().metricFamilySamples()
if (sample == null || sample.name == null || sample.labelNames == null || sample.labelValues == null) {
LOGGER.error("The provided Sample object is either null or one of its fields is null: {}", sample);
throw new IllegalArgumentException("The provided Sample object is either null or one of its fields is null: " + sample);
}
- Is the import
io.prometheus.metrics.model.registry.Collector
a replacement ofio.prometheus.client.Collector
, however, I couldn't find the below in the new Collector.
Enumeration<Collector.MetricFamilySamples> metricFamilySamples;
- Similarly how we can replace the
io.prometheus.client.exporter.common.TextFormat
?
Could you please help me with the code changes. Also, can you share any additional docs available that we can follow for migrating from the usage of simpleclient.
Metadata
Metadata
Assignees
Labels
No labels