Exemple #1
0
        public static IMetricServer EnableMetricsServer(Prometheus config)
        {
            IMetricServer metricsServer = null;

            if (config.Enabled)
            {
                var port = config.Port ?? 4000;
                metricsServer = new KestrelMetricServer(port: port);
                metricsServer.Start();

                Log.Information("Metrics Server started and listening on: http://localhost:{0}/metrics", port);
            }

            return(metricsServer);
        }
Exemple #2
0
 public Observability()
 {
     Prometheus = new Prometheus();
     Jaeger     = new Jaeger();
 }