feat: add UidProcessor to all Monolog channels and route newrelic via dedicated driver#3
Draft
Copilot wants to merge 2 commits into
Draft
feat: add UidProcessor to all Monolog channels and route newrelic via dedicated driver#3Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…r config Agent-Logs-Url: https://github.com/bytic/logger/sessions/15d9cf7a-05ba-410f-83d6-31ff0a9cb9cb Co-authored-by: gabrielsolomon <17990591+gabrielsolomon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bytic/logger/sessions/15d9cf7a-05ba-410f-83d6-31ff0a9cb9cb Co-authored-by: gabrielsolomon <17990591+gabrielsolomon@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
gabrielsolomon
May 9, 2026 09:33
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernizes the logger by attaching a unique request UID to every log record and ensuring New Relic receives log data through the correct driver path.
Changes
src/Manager/HasProcessors.php— new trait exposingprocessors()returning[new UidProcessor()]; designed to be overridden per-app if neededsrc/Manager.php— composesHasProcessorsalongside existing traitssrc/Manager/CreateDrivers.php— passes$this->processors()tonew Monolog(...)increateStackDriver,createSingleDriver,createDailyDriver, andcreateEmergencyLoggersrc/Manager/MonologWrappers.php— passes$this->processors()increateMonologDriver(covers allmonolog-driver channels)config/logging.php— fixesnewrelicchannel: wasdriver: monologpointing at a non-existent\Nip\Logger\Monolog\Handler\NewRelicHandler; now usesdriver: newrelic, which routes throughcreateNewrelicDriver()→\ByTIC\NewRelic\Monolog\HandlerResult
Every channel (file, New Relic, custom monolog) now tags records with a shared UID:
This makes cross-channel correlation (e.g. matching a file log entry to its New Relic counterpart) trivial.