You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! We are migrating our project using io.prometheus:simpleclient:jar:0.15.0 to io.prometheus:prometheus-metrics-core:jar:1.2.1
Unfortunately there is a scenario which is not covered in the migration guides I was able to find.
Here is our scrapping controller
@WebEndpoint(id = "customPrometheus")
public class CustomPrometheusScrapeEndpoint {
private final CollectorRegistry collectorRegistry;
public BusinessPrometheusScrapeEndpoint(CollectorRegistry collectorRegistry) {
this.collectorRegistry = collectorRegistry;
}
@ReadOperation(produces = {"text/plain; version=0.0.4; charset=utf-8"})
public String scrape() throws IOException {
Writer writer = new StringWriter();
TextFormat.write004(writer, this.collectorRegistry.metricFamilySamples());
return writer.toString();
}
}
I see that both TextFormat and CollectorRegistry are already removed and there is no indication what the code above should be replaced with. Could you please give a hint here?
The text was updated successfully, but these errors were encountered:
Hi! We are migrating our project using
io.prometheus:simpleclient:jar:0.15.0
toio.prometheus:prometheus-metrics-core:jar:1.2.1
Unfortunately there is a scenario which is not covered in the migration guides I was able to find.
Here is our scrapping controller
I see that both TextFormat and CollectorRegistry are already removed and there is no indication what the code above should be replaced with. Could you please give a hint here?
The text was updated successfully, but these errors were encountered: