propagate-correlation-id

Installation
SKILL.md

Propagating Correlation IDs in ABP

When to Use

  • Preserve one request identifier across inbound ASP.NET Core requests and ABP-generated outbound HTTP calls.
  • Change the header name or stop echoing the ID in the response.
  • Read the current correlation ID in application code.
  • Diagnose a missing ID in a service-to-service call made by an ABP HTTP client proxy.

When Not to Use

  • Distributed traces, spans, exporters, or trace sampling — out of scope here; ABP ships no OpenTelemetry framework module, so wire the OpenTelemetry .NET SDK directly.
  • General HTTP headers, CSRF, or security middleware — use secure-web-requests.
  • Distributed event correlation or broker transport — use background-jobs-and-events.

How it works

ICorrelationIdProvider has two operations: Get() returns the current nullable ID, and Change(string?) sets it until the returned IDisposable is disposed. The default singleton provider stores the value in AsyncLocal<string?> and restores the parent value on disposal.

Installs
17
GitHub Stars
32
First Seen
Sep 5, 2026