Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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>

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...