You can find code samples referenced below for App Metrics features on GitHub.
AspNetCore2.Health.Api.QuickStart.csproj: An ASP.NET Core 2.0 Api with App Metrics Health 2.0 basics configured. 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 Health.
INLINE_CHECKS: Adds example of pre-defined health checks and an example in-line health check.
Net452.Health.Console.QuickStart.csproj: A NET452 console application with App Metrics Health 2.0 basics configured.
Net461.Health.MicrosoftDI.Console.QuickStart: A NET461 console application with App Metrics Health 2.0 basics configured using
App Metrics 1.0 samples can be found on GitHub here