Store logs from appservice to Application Insights

157 views Asked by At

I have some errors in Application Insights when try storing logs to Application Insights

AI: ApplicationInsights configuration file loading failed. 
Type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights' will not be create. 
Error: 'Constructor on type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor' not found.'. Monitoring will continue if you set InstrumentationKey programmatically.
AI: ApplicationInsights configuration file loading failed. 
Type 'Microsoft.ApplicationInsights.Extensibility.Implementation.ApplicationId.ApplicationInsightsApplicationIdProvider, Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35'does not implement 'Microsoft.ApplicationInsights.Extensibility.IApplicationIdProvider'. Type loading was skipped. Monitoring will continue.
AI: ApplicationInsights configuration file loading failed. Type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights' will not be create.
Error: 'Constructor on type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor' not found.'. Monitoring will continue if you set InstrumentationKey programmatically.
AI: ApplicationInsights configuration file loading failed. 
Type 'Microsoft.ApplicationInsights.Extensibility.OperationCorrelationTelemetryInitializer, Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
does not implement 'Microsoft.ApplicationInsights.Extensibility.ITelemetryInitializer'. Type loading was skipped. Monitoring will continue.

I enabled Application Insights

The image of logs in appinsight enter image description here

The image activities logs when enable appinsights enter image description here

Appsettings Appsettings

The older logs in Transaction Search of Application Insights

The newest logs in Transaction Search

Only trace logs have problem

1

There are 1 answers

1
Tú Diễm On
AI: ApplicationInsights configuration file loading failed. 
Type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights' will not be create. 
Error: 'Constructor on type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor' not found.'. Monitoring will continue if you set InstrumentationKey programmatically.
AI: ApplicationInsights configuration file loading failed. 
Type 'Microsoft.ApplicationInsights.Extensibility.Implementation.ApplicationId.ApplicationInsightsApplicationIdProvider, Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35'does not implement 'Microsoft.ApplicationInsights.Extensibility.IApplicationIdProvider'. Type loading was skipped. Monitoring will continue.
AI: ApplicationInsights configuration file loading failed. Type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights' will not be create.
Error: 'Constructor on type 'Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor' not found.'. Monitoring will continue if you set InstrumentationKey programmatically.
AI: ApplicationInsights configuration file loading failed. 
Type 'Microsoft.ApplicationInsights.Extensibility.OperationCorrelationTelemetryInitializer, Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
does not implement 'Microsoft.ApplicationInsights.Extensibility.ITelemetryInitializer'. Type loading was skipped. Monitoring will continue.

I think it is fine if I add some nugetpackages bellow in my code and this error doesn'n affect the logs in application insights Nuget packages