![]() |
VOOZH | about |
dotnet add package OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule --version 1.15.2
NuGet\Install-Package OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule -Version 1.15.2
<PackageReference Include="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" Version="1.15.2" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" Version="1.15.2" />Directory.Packages.props
<PackageReference Include="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" />Project file
paket add OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule --version 1.15.2
#r "nuget: OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule, 1.15.2"
#:package OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule@1.15.2
#addin nuget:?package=OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule&version=1.15.2Install as a Cake Addin
#tool nuget:?package=OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule&version=1.15.2Install as a Cake Tool
| Status | |
|---|---|
| Stability | Stable |
| Code Owners | @open-telemetry/dotnet-contrib-maintainers |
👁 NuGet version badge
👁 NuGet download count badge
👁 codecov.io
The ASP.NET Telemetry HttpModule is a skeleton to enable distributed tracing and metrics of incoming ASP.NET requests using the OpenTelemetry API.
If you are using the traditional packages.config reference style, a
web.config transform should run automatically and configure the
TelemetryHttpModule for you. If you are using the more modern PackageReference
style, this may need to be done manually. For more information, see:
Migrate from packages.config to
PackageReference.
To configure your web.config manually, add this:
<system.webServer>
<modules>
<add
name="TelemetryHttpModule"
type="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule,
OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule"
preCondition="integratedMode,managedHandler" />
</modules>
</system.webServer>
TelemetryHttpModule provides hooks to create and manage activities and metrics.
To automatically register the entire infrastructure using OpenTelemetry, please use the OpenTelemetry.Instrumentation.AspNet NuGet package.
TelemetryHttpModule provides a static options property
(TelemetryHttpModule.Options) which can be used to configure the
TelemetryHttpModule and listen to events it fires.
TextMapPropagator controls how trace context will be extracted from incoming
HTTP request messages. By default, W3C Trace
Context is enabled.
The OpenTelemetry API ships with a handful of standard
implementations
which may be used, or you can write your own by deriving from the
TextMapPropagator class.
To add support for Baggage propagation in addition to W3C Trace Context, use:
TelemetryHttpModuleOptions.TextMapPropagator = new CompositeTextMapPropagator(
new TextMapPropagator[]
{
new TraceContextPropagator(),
new BaggagePropagator(),
});
When using the OpenTelemetry.Instrumentation.AspNet
TelemetryHttpModuleOptions.TextMapPropagator is automatically initialized to
the SDK default propagator (Propagators.DefaultTextMapPropagator) which by
default supports W3C Trace Context & Baggage.
OnRequestStartedCallback, OnRequestStoppedCallback, and OnExceptionCallback
are provided on TelemetryHttpModuleOptions and will be fired by the
TelemetryHttpModule as requests are processed.
A typical use case for the OnRequestStartedCallback event is to create an activity
based on the HttpContextBase and ActivityContext.
OnRequestStoppedCallback and OnExceptionCallback are needed to add
information (tags, events, and/or links) to the created Activity based on the
request, response, and/or exception event being fired.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
Showing the top 2 NuGet packages that depend on OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule:
| Package | Downloads |
|---|---|
|
OpenTelemetry.Instrumentation.AspNet
ASP.NET instrumentation for OpenTelemetry .NET. |
|
|
C3D.Extensions.SystemWeb.OpenTelemetry.Application
Assembly Version: 0.1.0.0 File Version: 0.1.125.22927 Informational Version: 0.1.125+8f596e8497 Build Configuration: Release |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.15.2 | 189,921 | 4/21/2026 |
| 1.15.1 | 331,310 | 1/28/2026 |
| 1.15.0 | 21,150 | 1/21/2026 |
| 1.14.0 | 56,135 | 11/27/2025 |
| 1.14.0-rc.1 | 31,080 | 11/13/2025 |
| 1.13.0-rc.1 | 19,834 | 10/28/2025 |
| 1.13.0-beta.2 | 15,708 | 10/22/2025 |
| 1.13.0-beta.1 | 49,987 | 10/15/2025 |
| 1.12.0-beta.2 | 57,541 | 9/18/2025 |
| 1.12.0-beta.1 | 257,338 | 5/5/2025 |
| 1.11.0-beta.2 | 136,277 | 3/5/2025 |
| 1.11.0-beta.1 | 78,842 | 1/27/2025 |
| 1.10.0-beta.1 | 91,646 | 12/9/2024 |
| 1.9.0-beta.1 | 699,905 | 6/18/2024 |
| 1.8.0-beta.3 | 258,205 | 5/23/2024 |
| 1.8.0-beta.2 | 174,649 | 4/17/2024 |
| 1.8.0-beta.1 | 51,100 | 4/5/2024 |
| 1.7.0-beta.2 | 137,891 | 2/7/2024 |
| 1.7.0-beta.1 | 84,540 | 12/20/2023 |
| 1.6.0-beta.2 | 154,599 | 11/6/2023 |