APPLICATIONINSIGHTS_CONNECTION_STRING or APPINSIGHTS_INSTRUMENTATIONKEY is defined but the Application Insights Extension is not installed

Raymond Raymond event 2021-10-15 visibility 523
more_vert

Issue

Azure functions v4.0 .NET 6 based isolated worker application doesn't start because of the following issue:

Microsoft.Azure.WebJobs.Script: APPLICATIONINSIGHTS_CONNECTION_STRING or APPINSIGHTS_INSTRUMENTATIONKEY is defined but the Application Insights Extension is not installed. Please install the Application Insights Extension. See https://aka.ms/func-applicationinsights-extension for more details.

2021101581119-image.png

Cause

As of Azure Functions host version 4.0.0.16394, Application Insights is no longer included by default. It is now available as a separate extension.

More details: [Azure Functions][V4] Azure Functions 4.0.0-preview.5.16714 (breaking changes) #348

[Azure Functions] [V4] Application Insights is now available as an extension (breaking change) #346 

Resolution

For in-process .NET apps, install version 1.0.0-preview4 or later of the Microsoft.Azure.WebJobs.Extensions.ApplicationInsights extension package.

For isolated .NET apps, install version 1.0.0-preview4 or later of the Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights extension package. Also, make sure that the Microsoft.Azure.Functions.Worker and Microsoft.Azure.Functions.Worker.Sdk are updated to the latest versions.

2021101581852-image.png

If you cannot find find the extension package, you can directly add it into your project reference:

2021101582349-image.png

Local debug screenshot:

2021101583849-image.png

More from Kontext
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts