PPulse.Observability.AspNetCore 1.0.3

dotnet add package PPulse.Observability.AspNetCore --version 1.0.3
                    
NuGet\Install-Package PPulse.Observability.AspNetCore -Version 1.0.3
                    
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="PPulse.Observability.AspNetCore" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PPulse.Observability.AspNetCore" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="PPulse.Observability.AspNetCore" />
                    
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 PPulse.Observability.AspNetCore --version 1.0.3
                    
#r "nuget: PPulse.Observability.AspNetCore, 1.0.3"
                    
#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 PPulse.Observability.AspNetCore@1.0.3
                    
#: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=PPulse.Observability.AspNetCore&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=PPulse.Observability.AspNetCore&version=1.0.3
                    
Install as a Cake Tool

PPulse.Observability.AspNetCore

Policy Pulse observability integration for ASP.NET Core (.NET 8+) applications. Provides tracing, metrics, and structured logging export to the PPulse collector.

Installation

dotnet add package PPulse.Observability.AspNetCore

Setup

Call AddPolicyPulse on IServiceCollection in Program.cs:

// Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddPolicyPulse(
    configureOptions: opts =>
    {
        opts.AppCode = "MyApp";
        opts.AppName = "My Application";
        opts.Environment = "Production";
        opts.CollectorBaseUri = new Uri("https://your-collector/");
        opts.TenantCode = "your-tenant-code";
        opts.ApiKey = "your-api-key";
    },
    configureBuilder: b => b
        .WithMetrics().AddAspNetCoreMetrics()
        .WithTracing().AddAspNetCoreTracing()
        .WithLogging(builder.Logging)   // pass builder.Logging — applies log export immediately
);

Logging: WithLogging vs WithILoggingBuilder

In ASP.NET Core always use .WithLogging(builder.Logging), passing the WebApplicationBuilder.Logging instance. This applies the log export configuration eagerly when Build() is called internally by AddPolicyPulse.

Using .WithILoggingBuilder() alone inside AddPolicyPulse will silently skip log export — the binder delegate is created but never invoked, because AddPolicyPulse does not call LoggingBinder after building. .WithILoggingBuilder() is the right choice only for ASP.NET Framework (where you invoke LoggingBinder yourself) and Azure Functions (where the extension wires it up via ConfigureLogging).

Filtering exceptions

By default, all first-chance exceptions that occur during a faulted request (5xx) are evaluated. Use ConfigureException to control which exceptions are attached to the trace.

Namespace filtering

Restrict capture to exceptions whose stack trace passes through your own namespaces. Both include and exclude lists are supported and can be combined:

opts.ConfigureException = exOpts =>
{
    exOpts.IncludeNamespaces.Add("MyCompany.MyApp");
    exOpts.ExcludeNamespaces.Add("MyCompany.MyApp.Infrastructure.ThirdParty");
};

The stack walk stops at the first frame matching an included namespace. Frames in excluded namespaces are skipped. If IncludeNamespaces is empty, any frame not in ExcludeNamespaces qualifies.

Predicate filtering

For cases where namespace matching isn't expressive enough, supply a predicate. When a predicate is configured it is the sole decision maker — namespace rules are bypassed entirely:

opts.ConfigureException = exOpts =>
{
    exOpts.IncludeExceptionPredicate = ex =>
        ex is not OperationCanceledException && ex.StackTrace?.Contains("MyApp") == true;
};

Do not configure both a predicate and namespace lists — the predicate wins and the lists are ignored.

Note: Exception capture requires tracing to be configured. If .WithTracing().AddAspNetCoreTracing() is not called, Activity.Current will be null during requests and captured exceptions will be silently discarded with no enrichment of any span.

What is instrumented

  • Inbound HTTP requests (via AddAspNetCoreTracing)
  • Outbound HTTP calls
  • SQL client operations
  • Runtime and process metrics (via AddAspNetCoreMetrics)
  • PPulse metadata headers (tenant, correlation, session) extracted from inbound requests and attached to traces and logs
  • First-chance exceptions captured and attached to the active trace
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.3 79 8/18/2026