Problemen met Azure-toepassing Insights Agent (voorheen Status Monitor v2) oplossen
Dit artikel bevat informatie over probleemoplossing om problemen met gegevensverzameling op te lossen die u mogelijk ondervindt wanneer Application Insights-bewaking is ingeschakeld.
Bekende problemen
Conflicterende DLL's in de map bin van een app
Als een van deze dynamic-link-bibliotheken (DLL's) aanwezig is in de map bin , kan de bewaking mislukken:
- Microsoft.ApplicationInsights.dll
- Microsoft.AspNet.TelemetryCorrelation.dll
- System.Diagnostics.DiagnosticSource.dll
Sommige van deze DLL's zijn opgenomen in de standaard-app-sjablonen van Visual Studio, zelfs als uw app deze niet gebruikt. U kunt hulpprogramma's voor probleemoplossing gebruiken, zoals de volgende hulpprogramma's, om symptomatisch gedrag te zien:
PerfView:
ThreadID="7,500" ProcessorNumber="0" msg="Found 'System.Diagnostics.DiagnosticSource, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' assembly, skipping attaching redfield binaries" ExtVer="2.8.13.5972" SubscriptionId="" AppName="" FormattedMessage="Found 'System.Diagnostics.DiagnosticSource, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' assembly, skipping attaching redfield binaries"
IISReset en app-belasting (zonder telemetrie). Onderzoek met Sysinternals (Handle.exe en ListDLLs.exe):
.\handle64.exe -p w3wp | findstr /I "InstrumentationEngine AI. ApplicationInsights" E54: File (R-D) C:\Program Files\WindowsPowerShell\Modules\Az.ApplicationMonitor\content\Runtime\Microsoft.ApplicationInsights.RedfieldIISModule.dll .\Listdlls64.exe w3wp | findstr /I "InstrumentationEngine AI ApplicationInsights" 0x0000000009be0000 0x127000 C:\Program Files\WindowsPowerShell\Modules\Az.ApplicationMonitor\content\Instrumentation64\MicrosoftInstrumentationEngine_x64.dll 0x0000000009b90000 0x4f000 C:\Program Files\WindowsPowerShell\Modules\Az.ApplicationMonitor\content\Instrumentation64\Microsoft.ApplicationInsights.ExtensionsHost_x64.dll 0x0000000004d20000 0xb2000 C:\Program Files\WindowsPowerShell\Modules\Az.ApplicationMonitor\content\Instrumentation64\Microsoft.ApplicationInsights.Extensions.Base_x64.dll
PowerShell-versies
Dit product is geschreven en getest met PowerShell-versie 5.1. Deze module is niet compatibel met PowerShell-versie 6 of 7. U wordt aangeraden PowerShell 5.1 naast nieuwere versies te gebruiken. Zie PowerShell 7 naast elkaar gebruiken met PowerShell 5.1 voor meer informatie.
Conflict met gedeelde IIS-configuratie
Als u een cluster met webservers hebt, gebruikt u mogelijk een gedeelde configuratie. De HttpModule kan niet worden geïnjecteerd in deze gedeelde configuratie. Voer de opdracht Inschakelen op elke webserver uit om de DLL te installeren in de Global Assembly Cache (GAC) van elke server.
Nadat u de opdracht Inschakelen hebt uitgevoerd, voert u de volgende stappen uit:
Ga naar de gedeelde configuratiemap en zoek het applicationHost.config-bestand .
Voeg deze XML-code toe aan de <sectie modules> van uw configuratie:
<modules> <!-- Registered global managed http module handler. The 'Microsoft.AppInsights.IIS. ManagedHttpModuleHelper.dll' must be installed in the GAC before this config is applied. --> <add name="ManagedHttpModuleHelper" type="Microsoft.AppInsights.IIS.ManagedHttpModuleHelper. ManagedHttpModuleHelper, Microsoft.AppInsights.IIS.ManagedHttpModuleHelper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" /> </modules>
Geneste IIS-toepassingen
Geneste toepassingen in IIS (Internet Information Services) in versie 1.0 worden niet geïnstrueerd.
Geavanceerde SDK-configuratie is niet beschikbaar
De SDK-configuratie is niet beschikbaar voor de eindgebruiker in versie 1.0.
Problemen met PowerShell oplossen
Bepalen welke modules beschikbaar zijn
U kunt de Get-Module -ListAvailable
opdracht gebruiken om te bepalen welke modules zijn geïnstalleerd.
Een module importeren in de huidige sessie
Als een module niet is geladen in een PowerShell-sessie, kunt u deze handmatig laden door de opdracht uit te Import-Module <path to psd1>
voeren.
Problemen met de Application Insights Agent-module oplossen
De opdrachten weergeven die beschikbaar zijn in de Application Insights Agent-module
Voer de Get-Command -Module Az.ApplicationMonitor
opdracht uit om de beschikbare opdrachten op te halen:
CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Disable-ApplicationInsightsMonitoring 0.4.0 Az.ApplicationMonitor
Cmdlet Disable-InstrumentationEngine 0.4.0 Az.ApplicationMonitor
Cmdlet Enable-ApplicationInsightsMonitoring 0.4.0 Az.ApplicationMonitor
Cmdlet Enable-InstrumentationEngine 0.4.0 Az.ApplicationMonitor
Cmdlet Get-ApplicationInsightsMonitoringConfig 0.4.0 Az.ApplicationMonitor
Cmdlet Get-ApplicationInsightsMonitoringStatus 0.4.0 Az.ApplicationMonitor
Cmdlet Set-ApplicationInsightsMonitoringConfig 0.4.0 Az.ApplicationMonitor
Cmdlet Start-ApplicationInsightsMonitoringTrace 0.4.0 Az.ApplicationMonitor
De huidige versie van de Application Insights Agent-module bepalen
Voer de Get-ApplicationInsightsMonitoringStatus -PowerShellModule
opdracht uit om de volgende informatie over de module weer te geven:
- PowerShell-moduleversie
- Application Insights SDK-versie
- Bestandspaden van de PowerShell-module
Raadpleeg de naslaginformatie Get-ApplicationInsightsMonitoringStatus voor een gedetailleerde beschrijving van het gebruik van deze cmdlet.
Problemen met actieve processen oplossen
U kunt de processen op de geïnstrueerde computer inspecteren om te bepalen of alle DLL's zijn geladen en omgevingsvariabelen zijn ingesteld. Als de bewaking werkt, moeten er ten minste 12 DLL's worden geladen.
- Gebruik de
Get-ApplicationInsightsMonitoringStatus -InspectProcess
opdracht om de DLL's te controleren. - Gebruik de
(Get-Process -id <process-identifier>).StartInfo.EnvironmentVariables
opdracht om de omgevingsvariabelen te controleren. De volgende omgevingsvariabelen worden ingesteld in het werkproces of het .NET Core-proces:
COR_ENABLE_PROFILING=1
COR_PROFILER={324F817A-7420-4E6D-B3C1-143FBED6D855}
COR_PROFILER_PATH_32=<path-to-MicrosoftInstrumentationEngine_x86.dll>
COR_PROFILER_PATH_64=<path-to-MicrosoftInstrumentationEngine_x64.dll>
MicrosoftInstrumentationEngine_Host={CA487940-57D2-10BF-11B2-A3AD5A13CBC0}
MicrosoftInstrumentationEngine_HostPath_32=<path-to-Microsoft.ApplicationInsights.ExtensionsHost_x86.dll>
MicrosoftInstrumentationEngine_HostPath_64=<path-to-Microsoft.ApplicationInsights.ExtensionsHost_x64.dll>
MicrosoftInstrumentationEngine_ConfigPath32_Private=<path-to-Microsoft.InstrumentationEngine.Extensions.config>
MicrosoftInstrumentationEngine_ConfigPath64_Private=<path-to-Microsoft.InstrumentationEngine.Extensions.config>
MicrosoftAppInsights_ManagedHttpModulePath=<path-to-Microsoft.ApplicationInsights.RedfieldIISModule.dll>
MicrosoftAppInsights_ManagedHttpModuleType=Microsoft.ApplicationInsights.RedfieldIISModule.RedfieldIISModule
ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=Microsoft.ApplicationInsights.StartupBootstrapper
DOTNET_STARTUP_HOOKS=<path-to-Microsoft.ApplicationInsights.StartupHook.dll>
Raadpleeg de naslaginformatie Get-ApplicationInsightsMonitoringStatus voor een gedetailleerde beschrijving van het gebruik van deze cmdlet.
ETW-logboeken verzamelen met behulp van PerfView
Configuratie
Download PerfView.exe van GitHub.
Voer PerfView.exeuit .
Selecteer Collect>Collect op de menubalk.
Vouw Geavanceerde opties uit.
Schakel deze selectievakjes uit:
- Zip
- Samenvoegen
- .NET Symbol Collection
Stel deze aanvullende providers in:
*Microsoft-ApplicationInsights-AspNetCore,*Microsoft-ApplicationInsights-AspNetCore-AiHostingStartup,*Microsoft-ApplicationInsights-AspNetCore-StartupBootstrapper,*Microsoft-ApplicationInsights-AspNetCore-StartupHook,*Microsoft-ApplicationInsights-Core,*Microsoft-ApplicationInsights-Data,*Microsoft-ApplicationInsights-Extensibility-AppMapCorrelation-Dependency,*Microsoft-ApplicationInsights-Extensibility-AppMapCorrelation-Web,*Microsoft-ApplicationInsights-Extensibility-DependencyCollector,*Microsoft-ApplicationInsights-Extensibility-EventCounterCollector,*Microsoft-ApplicationInsights-Extensibility-EventSourceListener,*Microsoft-ApplicationInsights-Extensibility-HostingStartup,*Microsoft-ApplicationInsights-Extensibility-PerformanceCollector,*Microsoft-ApplicationInsights-Extensibility-PerformanceCollector-QuickPulse,*Microsoft-ApplicationInsights-Extensibility-Web,*Microsoft-ApplicationInsights-Extensibility-WindowsServer,*Microsoft-ApplicationInsights-FrameworkLightup,*Microsoft-ApplicationInsights-IIS-ManagedHttpModuleHelper,*Microsoft-ApplicationInsights-Java-IPA,*Microsoft-ApplicationInsights-LoggerProvider,*Microsoft-ApplicationInsights-Nodejs-IPA,*Microsoft-ApplicationInsights-RedfieldIISModule,*Microsoft-ApplicationInsights-SnapshotCollectorLightup,*Microsoft-ApplicationInsights-WindowsServer-Core,*Microsoft-ApplicationInsights-WindowsServer-TelemetryChannel,*Redfield-Microsoft-ApplicationInsights-AspNetCore,*Redfield-Microsoft-ApplicationInsights-Core,*Redfield-Microsoft-ApplicationInsights-Data,*Redfield-Microsoft-ApplicationInsights-Extensibility-AppMapCorrelation-Dependency,*Redfield-Microsoft-ApplicationInsights-Extensibility-AppMapCorrelation-Web,*Redfield-Microsoft-ApplicationInsights-Extensibility-DependencyCollector,*Redfield-Microsoft-ApplicationInsights-Extensibility-EventCounterCollector,*Redfield-Microsoft-ApplicationInsights-Extensibility-EventSourceListener,*Redfield-Microsoft-ApplicationInsights-Extensibility-PerformanceCollector,*Redfield-Microsoft-ApplicationInsights-Extensibility-PerformanceCollector-QuickPulse,*Redfield-Microsoft-ApplicationInsights-Extensibility-Web,*Redfield-Microsoft-ApplicationInsights-Extensibility-WindowsServer,*Redfield-Microsoft-ApplicationInsights-LoggerProvider,*Redfield-Microsoft-ApplicationInsights-WindowsServer-TelemetryChannel
Logboeken verzamelen
Voer in een opdrachtconsole met beheerdersbevoegdheden de
iisreset /stop
opdracht uit om IIS en alle web-apps uit te schakelen.Selecteer verzameling starten in PerfView.
Voer in een opdrachtconsole met beheerdersbevoegdheden de
iisreset /start
opdracht uit om IIS te starten.Blader naar uw app.
Nadat uw app is geladen, keert u terug naar PerfView en selecteert u Verzameling stoppen.
Volgende stappen
- Bekijk de API-verwijzing voor meer informatie over parameters die u mogelijk hebt gemist.
Contacteer ons voor hulp
Als u vragen hebt of hulp nodig hebt, maak een ondersteuningsaanvraag of vraag de Azure-communityondersteuning. U kunt ook productfeedback verzenden naar de Feedback-community van Azure.
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor