Created
March 9, 2017 18:30
-
-
Save debugthings/058508977eeda5bc78a3e1b615540efb to your computer and use it in GitHub Desktop.
Add QuickPulse programatically
This file contains hidden or 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
| public void EnableQuickPulse() | |
| { | |
| var qpmod = new Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule(); | |
| qpmod.Initialize(actConfig); | |
| Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryModules.Instance.Modules.Add(qpmod); | |
| actConfig.TelemetryProcessorChainBuilder.Use((next) => | |
| { | |
| var qpproc = new Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor(next); | |
| qpproc.Initialize(actConfig); | |
| return qpproc; | |
| }); | |
| actConfig.TelemetryProcessorChainBuilder.Build(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment