SnowBank.Networking.PacketCapture
7.4.2
dotnet add package SnowBank.Networking.PacketCapture --version 7.4.2
NuGet\Install-Package SnowBank.Networking.PacketCapture -Version 7.4.2
<PackageReference Include="SnowBank.Networking.PacketCapture" Version="7.4.2" />
<PackageVersion Include="SnowBank.Networking.PacketCapture" Version="7.4.2" />
<PackageReference Include="SnowBank.Networking.PacketCapture" />
paket add SnowBank.Networking.PacketCapture --version 7.4.2
#r "nuget: SnowBank.Networking.PacketCapture, 7.4.2"
#:package SnowBank.Networking.PacketCapture@7.4.2
#addin nuget:?package=SnowBank.Networking.PacketCapture&version=7.4.2
#tool nuget:?package=SnowBank.Networking.PacketCapture&version=7.4.2
SnowBank.Networking.PacketCapture
Captures HTTP request and response traffic for diagnostics and testing of distributed .NET applications.
Concept
Register the capture in your pipeline and every HTTP exchange (headers, timing, and within limits bodies) is recorded to an IPacketCaptureManager, which you can then read back from a test or a diagnostics endpoint.
It is designed for short-lived capture (a test, a repro, a targeted investigation), not long-running production tracing: captured data is held in memory for the duration of the run.
How to use
dotnet add package SnowBank.Networking.PacketCapture
On an ASP.NET Core host, register the services and add the middleware:
builder.Services.AddPacketCapture();
var app = builder.Build();
app.UsePacketCapture();
Then resolve IPacketCaptureManager to inspect the captured request/response exchanges:
var capture = app.Services.GetRequiredService<IPacketCaptureManager>();
// read back the captured exchanges via `capture` (headers, status, timing, ...)
Capture can also be attached at the Kestrel level via ListenOptions.UsePacketCapture(...).
Because captured data accumulates in memory, keep capture scoped to short tests or targeted repros.
| Product | Versions 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 is compatible. 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. net11.0 is compatible. |
-
net10.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Tools (>= 2.81.1)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Configuration (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Net.Http.Headers (>= 10.0.9)
- NodaTime (>= 3.3.2)
- OpenTelemetry.Api (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- SnowBank.Networking.Http (>= 7.4.2)
- System.Configuration.ConfigurationManager (>= 10.0.9)
- System.IO.Hashing (>= 10.0.9)
-
net11.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Tools (>= 2.81.1)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Http (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.5.26302.115)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Net.Http.Headers (>= 11.0.0-preview.5.26302.115)
- NodaTime (>= 3.3.2)
- OpenTelemetry.Api (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- SnowBank.Networking.Http (>= 7.4.2)
- System.Configuration.ConfigurationManager (>= 11.0.0-preview.5.26302.115)
- System.IO.Hashing (>= 11.0.0-preview.5.26302.115)
-
net8.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Tools (>= 2.81.1)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Configuration (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Net.Http.Headers (>= 8.0.28)
- NodaTime (>= 3.3.2)
- OpenTelemetry.Api (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- SnowBank.Networking.Http (>= 7.4.2)
- System.Configuration.ConfigurationManager (>= 10.0.9)
- System.IO.Hashing (>= 10.0.9)
- System.IO.Pipelines (>= 10.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SnowBank.Networking.PacketCapture:
| Package | Downloads |
|---|---|
|
SnowBank.Testing.Framework
SDK for writing tests for distributed .NET applications |
GitHub repositories
This package is not used by any popular GitHub repositories.