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
<PackageReference Include="Worker.Extensions.HttpTelemetryProcessor" Version="1.0.2" />
<PackageVersion Include="Worker.Extensions.HttpTelemetryProcessor" Version="1.0.2" />
<PackageReference Include="Worker.Extensions.HttpTelemetryProcessor" />
paket add Worker.Extensions.HttpTelemetryProcessor --version 1.0.2
#r "nuget: Worker.Extensions.HttpTelemetryProcessor, 1.0.2"
#:package Worker.Extensions.HttpTelemetryProcessor@1.0.2
#addin nuget:?package=Worker.Extensions.HttpTelemetryProcessor&version=1.0.2
#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
Add the Worker.Extensions.HttpTelemetryProcessor NuGet package to your Isolated Azure Functions project.
Apply the
HttpTelemetryProcessorattribute to your HTTP trigger function parameters. Configure the following properties:DiscardSuccessfulRequestTelemetry: When set totrue,RequestTelemetryevents generated by the functions host will be discarded if the trigger response code is< 400.FailureStatusCodeIsRequestFailure: When set totrue, theSuccessproperty ofRequestTelemetrywill be set tofalseif 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
DiscardSuccessfulRequestTelemetryis enabled, specific metrics in your Azure Function will be affected. For example, stats and charts reliant on individual request telemetry, such as theHTTP 2xxchart in the functions overview, will not display data for successful events. Similarly, theMonitortab will show inaccurateSuccess Count, and no items will be listed in theInvocation Tracestable. This is not an exhaustive list of the potential impacts.Aggregate telemetry, such as
Total Execution CountandSuccessful Execution Count, is not affected. These metrics use aggregated event data created before theHttpTelemetryProcessordiscards 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 | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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. |
-
.NETStandard 2.1
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.