Skip to content

Instantly share code, notes, and snippets.

@debugthings
Created March 9, 2017 18:30
Show Gist options
  • Select an option

  • Save debugthings/058508977eeda5bc78a3e1b615540efb to your computer and use it in GitHub Desktop.

Select an option

Save debugthings/058508977eeda5bc78a3e1b615540efb to your computer and use it in GitHub Desktop.
Add QuickPulse programatically
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