Metrics

App Metrics Code Samples

You can find code samples referenced below for App Metrics features on GitHub.

Solutions

AspNetCore2.Api.sln

AspNetCore2.Api.QuickStart.csproj: An ASP.NET Core 2.0 Api with App Metrics 2.0 basics configured. This project works with the web monitoring dashboards which can be imported from Grafana Labs. Enable the following compiler directives to highlight example configuration options:

  • HOSTING_OPTIONS: Custom hosting configuration which sets a custom port and endpoint for each of the endpoints added by App Metrics.
  • REPORTING: Schedules metric reporting via console.

Get the code here

AspNetCore2.Api.Reservoirs.csproj: An ASP.NET Core 2.0 Api with App Metrics 2.0 InfluxDB Reporting configured and demostrates the difference between supported reservoir types through a sample Grafana dashboard. Requires an appmetricsreservoirs InfluxDB database.

Get the code here

Net452.Metrics.Console.sln

Net452.Metrics.Console.QuickStart.csproj: A NET452 console application with App Metrics 2.0 basics configured.

Get the code here


App Metrics 1.0 samples can be found on GitHub here