Author Top Nguyen
- Support enable and config to the AppMetrics Service automatically.
- InfluxDB
- Download InfluxDB from https://www.influxdata.com/get-influxdb/
- Run InfluxDB by
influxd.exe
influxd.exe
- Prometheus
- Download Prometheus from https://prometheus.io/download/ or can use
brew install prometheus
- Config yml config file for Prometheus
- Run Cli
prometheus --config.file="<your path>/prometheus.yml"
- Default Prometheus run on localhost:9090
- Download Prometheus from https://prometheus.io/download/ or can use
-
Package Manager
PM> Install-Package Elect.AppMetrics
-
.NET CLI
dotnet add package Elect.AppMetrics
- In
Program.cs
add AppMetrics// By appsettings.json // Assumption in the appsettings.json the section config for `ElectAppMetricsOptions` named 'ElectAppMetrics' webHostBuilder.UseElectAppMetrics("ElectAppMetrics"); // Or by Object webHostBuilder.UseElectAppMetrics({object ElectAppMetricsOptions}); // Or by Lambda webHostBuilder.UseElectAppMetrics(_ => { // Setting properties });
- You can config endpoints, influxdb / prometheus via
ElectAppMetricsOptions
.
- You can config endpoints, influxdb / prometheus via
Elect.AppMetrics is licensed under the MIT License.