Download the PHP package benjamin-rqt/correlation-id without Composer
On this page you can find all versions of the php package benjamin-rqt/correlation-id. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package correlation-id
Correlation ID
A Symfony bundle that provides an easy way to manage a Correlation ID across your application.
Features
- Adds a Correlation ID to your application logs
- Propagates the Correlation ID to other applications via HTTP headers
- Exposes the Correlation ID in the response headers
- Automatically reuses the Correlation ID from incoming requests when present
- Generates a new Correlation ID when none is provided
- Automatically sends the Correlation ID to Sentry as a tag on exceptions (if Sentry SDK is installed)
Installation
`
Configuration
By default, the Correlation ID header name is X-Correlation-ID.
You can override it if needed.
Available options
header_name– The HTTP header name used for the Correlation ID.
config/packages/correlation_id.yaml:
HTTP Behavior
- If a Correlation ID is present in the incoming request headers, it will be reused.
- Otherwise, a new Correlation ID will be generated and used for the entire request lifecycle.
- The Correlation ID is always added to the response headers.
Messenger Middleware
This bundle provides a Messenger middleware that automatically attaches the Correlation ID to dispatched messages.
To enable it, simply add the middleware to your Messenger bus configuration.
This ensures that:
- The Correlation ID from the HTTP request is propagated to Messenger messages
- The same Correlation ID is available when handling messages asynchronously
Sentry Integration
If you have the Sentry PHP SDK installed, the Sentry integration is automatically enabled — no configuration required.
Requirements
sentry/sentry(orsentry/sentry-symfony) must be installed.
The bundle automatically detects the Sentry SDK and listens to kernel exceptions to call \Sentry\configureScope(), setting the correlation_id tag on the current Sentry scope.
This allows you to filter and search Sentry issues by Correlation ID, making it easy to trace errors back to a specific request.
All versions of correlation-id with dependencies
symfony/http-client Version ^7.0||^8.0
symfony/http-kernel Version ^6.0||^7.0||^8.0
symfony/monolog-bundle Version ^3.0|^4.0
symfony/uid Version ^7.0||^8.0