I am adding metric to my project. I am using OpenTelemetry.Instrumentation.Process package, but when I check the Targets status in Prometheus , I saw the following error:
unit "seconds" not a suffix of metric "process_cpu_time_seconds_total"
here is how I add the metrics
.WithMetrics(x =>
{
x.AddProcessInstrumentation();
x.AddHttpClientInstrumentation();
x.AddAspNetCoreInstrumentation();
//x.AddRuntimeInstrumentation();
x.AddPrometheusExporter()
.AddMeter("MyApplication.Api")
.AddMeter("System.Runtime")
.AddMeter("System.Net.Http")
.AddMeter("System.Data.SqlClient")
.AddMeter("Microsoft.AspNetCore.Hosting")
.AddMeter("Microsoft.AspNetCore.Server.Kestrel")
.AddMeter("Microsoft.AspNetCore.Http.Connections")
.AddMeter("Microsoft.AspNetCore.Routing")
.AddMeter("Microsoft.AspNetCore.Diagnostics")
.AddMeter("Microsoft.AspNetCore.RateLimiting");
});

I had the same issue - in my case I used
And it got fixed after I changed it to