Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Correlation Ids Monolog

Correlation Ids Monolog Laravel Package

manomano-tech/correlation-ids-monolog

Monolog handler that automatically attaches correlation IDs to every log record, making it easy to trace requests across services. Lightweight Laravel/PHP integration for consistent, searchable logs.

View on GitHub
Deep Wiki
Context7

Monolog processor for manomano-tech/correlation-ids package

Frequently asked questions about Correlation Ids Monolog
What does manomano-tech/correlation-ids-monolog actually do?
It is a small Monolog processor adapter for the manomano-tech/correlation-ids package. Its job is to inject the current correlation ID into every log record that Monolog handles, so the same identifier appears consistently across your application logs. It is only the logging bridge, not a complete tracing or observability solution. Request and job propagation must be handled separately by middleware or your own context management.
Is manomano-tech/correlation-ids-monolog still maintained?
No. The repository is archived, the last release was in 2018, and it has minimal ecosystem validation with around two stars and no dependents. There is no active maintainer, no security patching, and no support for newer Monolog or Laravel versions. Treat it as a reference implementation rather than a supported production dependency.
How do I install and register the processor in Laravel?
In principle you would require the Composer package and register the processor in config/logging.php through the tap or processor configuration for your Monolog channel. However, because the package is archived and built against older conventions, a direct install is likely to fail or need adaptation on current Laravel versions. The safer path is to copy the processor logic into your own codebase and register it as an internal Monolog processor.
Which Laravel and Monolog versions does this package support?
The 2018 release date strongly suggests assumptions built around Monolog 1.x and older Laravel logging pipelines. Modern Laravel releases ship with newer Monolog versions, so compatibility is not guaranteed and should be verified explicitly before use. Because the package is archived, no official compatibility updates should be expected.
How does the processor get the correlation ID into each log record?
A Monolog processor runs on every record before it is written and can add extra fields to the record context or extra arrays. This package reads the current correlation ID from the companion correlation-ids package and attaches it under a stable log field. The actual identifier creation and propagation still need to happen at the request or job boundary.
Does it propagate correlation IDs across queued jobs and scheduled tasks?
Not by itself. The processor only enriches log records with whatever correlation ID is already available in the current execution context. Propagating the ID into queue workers, scheduled jobs, and outbound HTTP calls requires additional middleware or job-level handling. The companion correlation-ids package is responsible for the ID itself, and even that does not automatically solve cross-process propagation.
What happens if no correlation ID is set when a log record is processed?
Safe handling of missing IDs is an important behavior to verify, and the archived package does not document it clearly. A well-behaved processor should either skip the field or write a neutral placeholder rather than throwing an exception during logging. If you reimplement the processor internally, add explicit tests for present, missing, and nested job contexts.
Can I implement the same behavior myself instead of using this package?
Yes, and for most teams that is the recommended approach. The logic is small: read the current correlation ID from a request-scoped service, context object, or static accessor, then add it to the Monolog record under a consistent key such as correlation_id. Implementing it internally avoids an orphaned 2018 dependency and lets you add tests and version constraints you control.
Is it safe to use manomano-tech/correlation-ids-monolog in production?
The functional risk is low because the processor surface area is tiny, but the lifecycle risk is high. An archived package with no maintainer means no security patches, no Monolog 3 support, and no guarantee it works with current Laravel logging configuration. Adopting it creates a dependency your team will eventually have to fork, patch, or replace.
How do I test that correlation IDs appear correctly in my logs?
Write unit tests that pass a synthetic Monolog record through the processor and assert the correlation_id field is present when an ID exists. Add cases for a missing ID and for a nested job context to confirm the processor fails safely. Then verify in staging that your configured logging channel produces structured, searchable log entries with the expected field name.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource