Skip to content

Releases: tiny-blocks/http-correlation-id

Release list

v1.0.0

Choose a tag to compare

@gustavofreze gustavofreze released this 01 Jul 13:30
2804cb9
  • PSR-15 correlation ID middleware. Reuses the inbound Correlation-Id request header when present, otherwise generates a new identifier. Exposes it as the correlationId request attribute and echoes it on the Correlation-Id response header for end-to-end tracing.
  • UUID v7 generation, pluggable. Time-ordered UUID v7 by default via ramsey/uuid, swappable through the CorrelationIdProvider contract and the fluent CorrelationIdMiddleware::create()->withProvider(...)->build() builder.
  • CorrelatedLogger. A PSR-3 logger decorator that attaches the request's correlation ID to every log entry's context under the correlation_id key, with zero extra plumbing at call sites.
  • Framework-agnostic, PHP 8.5. Depends only on PSR-7/15/3 interfaces and keeps a clean public API behind an Internal/ boundary.