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 the MetricFamilySamples.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 of io.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.
Hi Team! We are migrating our project from
micrometer-registry-prometheus:1.12.8to version1.13.8. I see that theio.prometheus:simpleclient:jar:0.16.0has been deprecated.We have few scenarios which I do not see in the migration guide.
Here are few scenarios,
io.prometheus.client.Collector.MetricFamilySamplesand theMetricFamilySamples.Sampleio.prometheus.metrics.model.registry.Collectora replacement ofio.prometheus.client.Collector, however, I couldn't find the below in the new Collector.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.