mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #1218] Each transaction is market as an error on New Relic #507
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#507
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolesar on GitHub (Nov 6, 2018).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1218
I do not know what is the initial idea when this code is written, but with this
elsecondition here each transaction will be marked as an error.github.com/Seldaek/monolog@6bb347c040/src/Monolog/Handler/NewRelicHandler.php (L94)@Seldaek commented on GitHub (Nov 19, 2018):
IMO monolog's newrelic handler is really mostly made for tracking errors.. I don't really see how we could treat non-errors nicely with the newrelic API. That's maybe better done at the application level? Or do you have a suggestion how this could be improved?
@kolesar commented on GitHub (Nov 20, 2018):
To be honest I do not have experience with New Relic too. My suggestion is only what I found during implementation it in my project, but probably it is the absolutely wrong way. As you say, maybe a different way of thinking and implementation is the solution.
@jderusse commented on GitHub (Dec 10, 2018):
Looking at the comment https://github.com/Seldaek/monolog/pull/1217#issuecomment-436212898 I think there is a misunderstood of the usage of new
NewRelicHandler(or more generally a misunderstood of NewRelic)NewRelic is not made for tracking logs (like logmatic or Sentry, ...), it only contains API to trac errors and response time.
The purpose of this handler is to send application's dis-function logs to NewRelic. In order to NOT send debug, notice or informational logs, you shouldn't configure a log level too low (IMHO
erroris enougth)@Seldaek commented on GitHub (Dec 11, 2018):
@jderusse I'd tend to agree there. Do you have any opinion on https://github.com/Seldaek/monolog/pull/1217#issuecomment-436189051 ? Is that the correct interpretation? Relating to https://github.com/Seldaek/monolog/blob/master/src/Monolog/ResettableInterface.php#L15
@jderusse commented on GitHub (Dec 11, 2018):
@Seldaek I answered in the PR (see https://github.com/Seldaek/monolog/pull/1217#issuecomment-446104846).
TL;DR: this is not the responsibility of Monolog to start or end a NewRelic transaction
@jamesmehorter commented on GitHub (Apr 26, 2023):
This is no longer true, NewRelic does now track logs. The NewRelic PHP Agent captures application errors—I would expect this logging package's "NewRelicHandler" to solely ship logs to NR.
That said, NR PHP Agent versions
>= 10.1.0.313will automatically ship logs using monolog@Seldaek commented on GitHub (Apr 28, 2023):
Ok so what I'm hearing is we maybe should just deprecate this handler? Or is there still value in the error collection?
@jamesmehorter commented on GitHub (Aug 29, 2023):
It seems that New Relic's PHP Agent presently does not log meta data which has been appended to log entries—only the log message is sent (whereas the Java Agent does do this). Perhaps once that feature is available deprecation of this handler would be logical.