NetAmpowering.AspNet 1.0.0

dotnet add package NetAmpowering.AspNet --version 1.0.0
                    
NuGet\Install-Package NetAmpowering.AspNet -Version 1.0.0
                    
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="NetAmpowering.AspNet" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetAmpowering.AspNet" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NetAmpowering.AspNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NetAmpowering.AspNet --version 1.0.0
                    
#r "nuget: NetAmpowering.AspNet, 1.0.0"
                    
#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.
#:package NetAmpowering.AspNet@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NetAmpowering.AspNet&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NetAmpowering.AspNet&version=1.0.0
                    
Install as a Cake Tool

NetAmpowering.AspNet

Zero-config OpenTelemetry APM for classic ASP.NET (WebForms and MVC 5) on .NET Framework 4.7.2+. OTLP export to Grafana Cloud, Tempo, Prometheus or any OpenTelemetry-compatible backend.

Installation

Install-Package NetAmpowering.AspNet
Install-Package NetAmpowering.AspNet.Mvc          # MVC 5: one span per action
Install-Package NetAmpowering.Coverage.AspNet     # optional: production code coverage

No code change and no web.config change for the HTTP modules: they are registered in code before Application_Start (PreApplicationStartMethod).

Configuration (web.config)

<appSettings>
  <add key="OpenTelemetry:Enabled" value="true" />
  <add key="OpenTelemetry:ApplicationName" value="MyLegacyApp" />
  <add key="OpenTelemetry:SamplingProbability" value="0.1" />
  <add key="OpenTelemetry:OtlpEndpoint" value="http://localhost:4318/v1/traces" />
  <add key="OpenTelemetry:OtlpHeaders" value="Authorization=Basic xxx" />
  <add key="OpenTelemetry:OtlpMetricsEndpoint" value="http://localhost:9090/api/v1/otlp/v1/metrics" />
  
</appSettings>

<system.web>
  
  <httpRuntime targetFramework="4.7.2" />
  <compilation targetFramework="4.7.2">
    <assemblies>
      
      <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
    </assemblies>
  </compilation>
</system.web>

What is traced

Source Detail
HTTP requests OpenTelemetry.Instrumentation.AspNet, W3C traceparent propagation
WebForms Page.{Type} span + one child span per stage (PreInit, Init, Load, PreRender, Unload…), tags page.is_postback, webforms.event_target
MVC 5 (.Mvc) one Controller.Action span with route and primitive parameters
Outgoing HTTP HttpClient and HttpWebRequest
Metrics .NET runtime, ASP.NET, coverage (NetAmpowering.Coverage)
Business services TracedProxy.Wrap<IService>(instance) (Castle DynamicProxy), to wire into your container (Autofac, Unity…)

Binding redirects (critical point)

OpenTelemetry dependencies require versions of System.Diagnostics.DiagnosticSource, System.Memory, System.Runtime.CompilerServices.Unsafe… that often differ from the ones already present. Without redirects: FileLoadException.

  • packages.config: tools/install.ps1 runs at install time (if bin\ exists; otherwise rerun the script below after a build).

  • PackageReference / any project:

    .\packages\NetAmpowering.AspNet.<version>\tools\Update-BindingRedirects.ps1 -WebConfig .\Web.config -BinPath .\bin
    
  • Automatic on every build (opt-in), in the .csproj:

    <PropertyGroup><NetAmpoweringUpdateBindingRedirects>true</NetAmpoweringUpdateBindingRedirects></PropertyGroup>
    

The script is idempotent and only touches the assemblyBinding section.

Known limitations

  • Code coverage: Fody only weaves compiled assemblies. .aspx / .cshtml files compiled on the fly by ASP.NET are not instrumented; use a Web Application Project (compiled code-behind) or precompile the views.
  • Continuous profiling (Pyroscope): not available on .NET Framework.
  • Double registration: if OpenTelemetry's TelemetryHttpModule is already declared in web.config, remove it.
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on NetAmpowering.AspNet:

Package Downloads
NetAmpowering.AspNet.Mvc

ASP.NET MVC 5 action tracing for the NetAmpowering APM. Registers a global filter automatically (no code change) and creates one OpenTelemetry span per controller action with controller, action, route and primitive parameters.

NetAmpowering.AspNet.WebApi

ASP.NET Web API 2 action tracing for the NetAmpowering APM (.NET Framework 4.7.2+). Registers a global filter automatically (IIS / System.Web hosting, no code change) and creates one OpenTelemetry span per ApiController action with controller, action, route, status code and primitive parameters. OWIN self-host: config.AddNetAmpoweringTracing().

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 45 10/17/2026