Skip to main content
Published
Nov 1, 2023
3y ago
Total Downloads
61.9M
61,872,311

Install

dotnet add package Microsoft.Azure.Functions.Worker.ApplicationInsights --version 1.1.0-preview1
ProductVersions
.NET Standard
netstandard2.0

README

Microsoft.Azure.Functions.Worker.ApplicationInsights

This package adds extension methods and services to configure ApplicationInsights for use in Azure Functions .NET isolated applications.

This package does not add Application Insights services directly. This must be done directly. Instead, this package only augments Application Insights with functions scenarios.

Getting Started

  1. Add packages
dotnet add package Microsoft.ApplicationInsights.WorkerService
dotnet add package Microsoft.Azure.Functions.Worker.ApplicationInsights
  1. Configure ApplicationInsights
services.AddApplicationInsightsTelemetryWorkerService();
services.ConfigureFunctionsApplicationInsights();

Distributed Tracing

This package adds an ITelemetryModule which listens to the Azure Functions worker ActivitySource, converting emitted Activitys into DependencyTelemetry.

Logging

This package will adjust logging behavior of the worker to no longer emit logs through the host application. Instead, logs are sent directly to application insights from the worker.

In-Proc Comparison / Changes

With this package changing the worker to send telemetry directly to application insights, custom ITelemetryInitializer or ITelemetryProcessor will only apply to worker-originating telemetry. Telemetry which originates from the host process will not be ran through the same telemetry pipeline. This means when comapred to an in-proc functions app, you may see some telemetry items missing customizations performed in initialziers or processors. These telemetry items have originated from the host.

Configuration

See this document on configuring Application Insights for dotnet applications.

Changes from Previous Version

No structural changes between v1.0.0 and v1.1.0-preview1.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.