2

I'm tracking metrics from WPF application. I have updated Application Insights DLLs from 0.17 to 1.1. This meant removing Old DLLs and adding the SDK via Nuget. Now i don't see my metrics/events in the portal. I see no activity in the debugger output window. Activating DeveloperMode don't seem to do anything.

TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;

I can see that the AI DLLs are placed correctly in the output folder, and I get no error messages when sending events. But no data seems to come through any more.

I have tried to check traffic with fiddler. But no data seems to be sent. I have already tried to do what is suggested here:

https://azure.microsoft.com/en-us/documentation/articles/app-insights-troubleshoot-faq/#how-do-i-upgrade-from-older-sdk-versions

Any suggestions to what could be the problem?

Solution: Make sure the ApplicationInsights.config properties is set to

"Always copy"

or

"Copy if newer"

Bonus: How to configure 1.1

https://azure.microsoft.com/en-us/documentation/articles/app-insights-configuration-with-applicationinsights-config/

1 Answer 1

0

In the newer 1.1 SDK setting up should be simpler. You can simply new up a telemetryClient to send. You shouldn't need any additional config file or additional code.

tc = new TelemetryClient();
tc.InstrumentationKey = "GET YOUR KEY FROM THE PORTAL";
tc.TrackEvent("SampleEvent");

Some additional details about getting setup for a WPF app can be found here.

2
  • Setting the InstrumentationKey like you suggest, made it send events. I am, however, confused. When I install AI via Nuget, the ApplicationInsights.config file is created in solution. Setting the instrumentation key in the .config apparently did nothing. This makes be wonder if any of the other settings actually has any effect. Can you enlighten me? (I'd like to get rid of the perf counter and dependency thing) Aug 6, 2015 at 10:12
  • I just figured out, that the ApplicationInsights.config file, is not set to "Copy if newer" in the file properties. Apparently this didn't happen when nuget added it to the project file. Therefore setting the key in code worked. But setting it in a config file that wasn't used, didn't. Aug 6, 2015 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.