Worker.Extensions.HttpTelemetryProcessor 1.0.2

dotnet add package Worker.Extensions.HttpTelemetryProcessor --version 1.0.2
NuGet\Install-Package Worker.Extensions.HttpTelemetryProcessor -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Worker.Extensions.HttpTelemetryProcessor" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Worker.Extensions.HttpTelemetryProcessor --version 1.0.2
#r "nuget: Worker.Extensions.HttpTelemetryProcessor, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Worker.Extensions.HttpTelemetryProcessor as a Cake Addin
#addin nuget:?package=Worker.Extensions.HttpTelemetryProcessor&version=1.0.2

// Install Worker.Extensions.HttpTelemetryProcessor as a Cake Tool
#tool nuget:?package=Worker.Extensions.HttpTelemetryProcessor&version=1.0.2

Custom HTTP Request Telemetry Processing for Isolated Azure Functions

This Worker extension provides the ability to modify and/or skip RequestTelemetry events generated in the Azure Functions host.

Usage

  1. Add the Worker.Extensions.HttpTelemetryProcessor NuGet package to your Isolated Azure Functions project.

  2. Apply the HttpTelemetryProcessor attribute to your HTTP trigger function parameters. Configure the following properties:

    • DiscardSuccessfulRequestTelemetry: When set to true, RequestTelemetry events generated by the functions host will be discarded if the trigger response code is < 400.
    • FailureStatusCodeIsRequestFailure: When set to true, the Success property of RequestTelemetry will be set to false if the trigger response code is >= 400.

Example:

[Function("Ping")]
public HttpResponseData Ping([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "ping")] HttpRequestData req, 
[HttpTelemetryProcessor( DiscardSuccessfulRequestTelemetry = true, FailureStatusCodeIsRequestFailure = true)] object ignore)
{
    // ... your code ...
}

Notes

  • When DiscardSuccessfulRequestTelemetry is enabled, specific metrics in your Azure Function will be affected. For example, stats and charts reliant on individual request telemetry, such as the HTTP 2xx chart in the functions overview, will not display data for successful events. Similarly, the Monitor tab will show inaccurate Success Count, and no items will be listed in the Invocation Traces table. This is not an exhaustive list of the potential impacts.

  • Aggregate telemetry, such as Total Execution Count and Successful Execution Count, is not affected. These metrics use aggregated event data created before the HttpTelemetryProcessor discards individual request telemetry.

How Does It Work?

The WebJobs extension WebJobs.Extensions.HttpTelemetry (available on NuGet) will be loaded by the functions host. The functions.metadata file is parsed during the startup to determine the configuration of each HttpTelemetryProcessor attribute on your HTTP triggers. The existing TelemetryConfiguration registered by the function host is then overridden with a new configuration that includes our custom HttpTelemetryProcessor. This processor is responsible for modifying or discarding RequestTelemetry events based on your configurations.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 2,239 12/20/2023
1.0.1 132 12/16/2023