Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I set the app.UseHttpMetrics(); to monitor, but I want to set the metrics to work on an another port when api work on 5000.

What I have tried:

I search some blogs and docuement, but I can not find some relative article about how to change it. Can anyone give a link to reference it.
Posted
Updated 17-Feb-21 19:32pm

1 solution

I think you can use:
Quote:
var metricServer = new MetricServer(port: 1234);
metricServer.Start();
Taken from: GitHub - prometheus-net/prometheus-net: .NET library to instrument your code with Prometheus metrics[^]
Also see: Hooking up Prometheus within a .NET Core application[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900