0
votes

I am trying to connect my c# application to app insights. to test this I am doing a simple TrackEvent request. No errors show in console, and the events do not appear in app insights even after their two hour SLA.

TelemetryConfiguration.Active.InstrumentationKey = "d87f25f7-ea56-43b8-88c1-eb0e9d3dc27f";
TelemetryClient telemetryClient = new TelemetryClient();  

while (true)
{
    telemetryClient.TrackEvent("run");
    telemetryClient.Flush();
    Thread.Sleep(5000);
}

Console output :

Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights.d87f25f7-ea56-43b8-88c1-eb0e9d3dc27f.Event","time":"2017-11-29T23:18:34.5678001Z","iKey":"d87f25f7-ea56-43b8-88c1-eb0e9d3dc27f","tags":{"ai.internal.sdkVersion":"dotnet:2.4.0-32153","ai.cloud.roleInstance":"igsandle-PC1.redmond.corp.microsoft.com"},"data":{"baseType":"EventData","baseData":{"ver":2,"name":"runk"}}}

Thanks

1
Can you please double check that your instrumentation key copied correctly (and that it is not subscription id, for instance)? Could not find it in our system. - ZakiMa
yeah it is correct when it wasn't working I created another instance and deleted this one that's why you probably can't find it. here is the new key: 105aad6c-27a0-449f-81f8-102afef23abf - Tacot

1 Answers

1
votes

Looks like that guid is not an "Instrumentation Key". Can you please confirm that you used a guid from this field:

enter image description here