Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Azure by (5.8k points)

There is a WPF application written in Visual Studio. Can I add Application Insights to this WPF app? I would like to know how many times a button/tile is clicked. Since there are multiple installations of the same application, I would like to know which button was clicked on how many times from which user/installation. Can this be done with Application Insights?

1 Answer

0 votes
by (9.6k points)

Update the applicationinsights.config as follows:

<?xml version="1.0" encoding="utf-8"?>

<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">

    <TelemetryChannel>

        <DeveloperMode>false</DeveloperMode>

    </TelemetryChannel>

    <TelemetryModules>

        <Add Type="Microsoft.ApplicationInsights.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights"/>

    </TelemetryModules>

    <InstrumentationKey>**your-instrumentation-key-guid**</InstrumentationKey>

</ApplicationInsights>

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...