How to add prefix with default metrics in Prometheus metrics for c# Nuget Package prometheus-net.AspNetCore

Viewed 293

I am trying to add prefix with default metrics of prometheus but for now there is no clue to add prefix with default metrics. For example default metric look like:

http_requests_in_progress

It should be like:

prefix_http_requests_in_progress

I am using Nuget Package:

prometheus-net.AspNetCore 4.1.1

I have initiated the sever like this:

 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
 {
       try { app.UseMetricServer("/metrics"); app.UseHttpMetrics();  } catch (Exception ex) {  }        
 }
0 Answers
Related