How to instrument ServiceStack .NET Core Application

9 views
Skip to first unread message

Samrat Alamgir

unread,
Mar 10, 2023, 4:52:15 AM3/10/23
to Prometheus Users
Hi,
I want to add Prometheus to a ServiceStack .NET core (3.1) application. But seems the regular way to add the middleware is not working.
like, app.UseMetricServer(); is not working.
Then I found a work around, that creating a MerticServer in Configure() method like this:
var metricServer = new MetricServer(1234);
 metricServer.Start();
But this requires run the Visual Studio as Admin mode.
Now I am getting the ServerMetrics for the new endpoint, but can't get HttpMetrics after adding the app.UseHttpMetrics();
So what's the actual way to configure and get default HttpMetrics for endpoints in ServiceStack. 

Thanks, 
 Samrat
Reply all
Reply to author
Forward
0 new messages