Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

44 linhas
3.4 KiB

  1. <ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  2. <TelemetryModules xdt:Transform="InsertIfMissing">
  3. <Add xdt:Transform="InsertIfMissing" xdt:Locator="Match(Type)" Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
  4. <!--
  5. Use the following syntax here to collect additional performance counters:
  6. <Counters>
  7. <Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
  8. ...
  9. </Counters>
  10. PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName
  11. NOTE: performance counters configuration will be lost upon NuGet upgrade.
  12. The following placeholders are supported as InstanceName:
  13. ??APP_WIN32_PROC?? - instance name of the application process for Win32 counters.
  14. ??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
  15. ??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
  16. -->
  17. </Add>
  18. <Add xdt:Transform="InsertIfMissing" xdt:Locator="Match(Type)" Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector" />
  19. </TelemetryModules>
  20. <!--
  21. QuickPulse telemetry processor must always be the first telemetry processor.
  22. There is no syntax to allow insertion in the beginning of the list for when there are no siblings (we only have InsertBefore and InsertAfter), so do a trick:
  23. 1. Remove all previously existing QuickPulse telemetry processors (if any)
  24. 2. Add QuickPulse telemetry processor as the last telemetry processor
  25. 3. Add QuickPulse telemetry processor as the first telemetry processor (we can now use InsertBefore because we know there's at least one sibling present)
  26. 4. Remove the last QuickPulse telemetry processor
  27. Note that we have a default namespace in ApplicationInsights.config, and since XDT won't allow us to specify the namespace map, we'll have to use local-name() in XPath expressions
  28. -->
  29. <TelemetryProcessors xdt:Transform="InsertIfMissing">
  30. <Add xdt:Transform="RemoveAll" xdt:Locator="Match(Type)" Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector" />
  31. <Add xdt:Transform="Insert" Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector" />
  32. </TelemetryProcessors>
  33. <Add xdt:Transform="InsertBefore(/*[local-name()='ApplicationInsights']/*[local-name()='TelemetryProcessors']/*[local-name()='Add'][1])" Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector" />
  34. <Add xdt:Transform="Remove" xdt:Locator="XPath(/*[local-name()='ApplicationInsights']/*[local-name()='TelemetryProcessors']/*[local-name()='Add' and starts-with(./@Type,'Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor') and contains(./@Type,' Microsoft.AI.PerfCounterCollector')][last()])"/>
  35. </ApplicationInsights>