Created
January 16, 2019 06:53
-
-
Save johndowns/fa0df0587cb78f3c3eeff32e6fba7f7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.ApplicationInsights; | |
using Microsoft.ApplicationInsights.Metrics; | |
using Microsoft.Extensions.Logging; | |
private static TelemetryClient TelemetryClient = new TelemetryClient(); | |
private static Random Random = new Random(); | |
public static void Run(TimerInfo timer, ILogger log) | |
{ | |
var randomValue = (int)Random.NextValue(0, 10); | |
TelemetryClient.GetMetric("My Test Metric").TrackValue(randomValue); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment