Coder Social home page Coder Social logo

Comments (6)

zainspresso avatar zainspresso commented on September 28, 2024 1

This is again occurring. Laravel 10 + v10.9.0.324 of the PHP agent

from newrelic-php-agent.

darcyrailip avatar darcyrailip commented on September 28, 2024

Hey @Fahmy-Mohammed, I see you've added the backlog tag.

Is this confirmed to be a bug?

I'm just a bit confused since the release notes say support for Laravel 7 was explicitly added in version 9.13.0.270.

Surely someone else is running into this?

from newrelic-php-agent.

zsistla avatar zsistla commented on September 28, 2024

Hi @darcyrailip,

Thank you for your engagement!

I know a workaround was listed on the forum post you cited (did it work for you?), but we’d like to try to work through this issue with you. Unfortunately we are not able to reproduce it on a Laravel 7 setup yet:
image

Could you provide a few more details about your environment:

  1. What version of the PHP Agent are you using?
  2. What version of PHP are you using?
  3. Are there any other environmental details you can provide? (OS used, Dockerized container, etc).
  4. Are all Laravel transaction names showing strangely for you, or only specific ones?

A Laravel txn name can be set in various ways.

Would it be possible to post some agent and daemon logs (or log snippets, sanitized for your privacy) to get a better idea what is going on?

To gather detailed log information for New Relic's PHP agent:
1. Find the configuration file that your server is reading. Most likely it is in /etc/php.d/newrelic.ini. If that file is missing, check your 'php.ini' file for newrelic.* entries.

2. Update (or insert) the newrelic.loglevel and newrelic.daemon.loglevel settings to "debug" Here are examples of the necessary lines:
newrelic.loglevel = "verbosedebug"

newrelic.daemon.loglevel = "verbosedebug"
Make certain that these two lines are not commented:
newrelic.logfile = "/var/log/newrelic/php_agent.log"
newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
You can adjust the path as appropriate.

3. Uncomment the newrelic.daemon.auditlog = "/var/log/newrelic/audit.log" removing the leading ;

4. Restart the PHP daemon with the "/etc/init.d/newrelic-daemon restart" command. IGNORE ANY ERRORS YOU RECEIVE - DO NOT CREATE A CFG FILE IF ONE DOES NOT EXIST

5. Restart Apache, FPM, nginx, or whatever dispatcher you're using for your PHP application.

6. Exercise your web application so you think it will generate problem you have encountered or the metrics you want to see.

7. Collect about five minutes of the logs from the time you restarted the application in step 4 or until the problem manifests itself. The log locations typically are:
/var/log/newrelic/php_agent.log
/var/log/newrelic/newrelic-daemon.log

Note that this is a highly verbose logging level, so after you've finished collecting data, you will want to restore the old logging level by changing both log level settings back to 'info' and performing both restarts again.

from newrelic-php-agent.

humunuk avatar humunuk commented on September 28, 2024

Hey, I think the problem appears only when caching routes(?).

PHP Version: 7.4
Laravel: 7.x
Agent: 9.16.0.295

Here is an example from my auditlog after I enabled it:

2021/04/16 07:16:53.933815 command='analytic_event_data' url='REDACTED",{"reservoir_size":833,"events_seen":4},[[{"type":"Transaction","name":"WebTransaction/Action/generated::Z7mZPkw5PDQzj3ra","timestamp":1618546610.80718,"duration":0.06312,"totalTime":0.06312,"nr.guid":"821424e33e615a5b","nr.apdexPerfZone":"S","nr.tripId":"821424e33e615a5b","nr.pathHash":"2678fa52","nr.alternatePathHashes":"8b744442","databaseDuration":0.00651,"databaseCallCount":27,"error":false},{},{"response.headers.contentType":"application/json","http.statusCode":200,"response.statusCode":200,"httpResponseCode":"200","request.uri":"/workbiter/dashboard/calendar","request.method":"GET","request.headers.host":"REDACTED.com","request.headers.accept":"application/json, text/plain, /"}],[{"type":"Transaction","name":"WebTransaction/Action/generated::QRmHMrp4Dun4GIpC","timestamp":1618546612.51234,"duration":0.05367,"totalTime":0.05367,"nr.apdexPerfZone":"S","databaseDuration":0.00083,"databaseCallCount":6,"error":false},{},{"response.headers.contentType":"text/html","http.statusCode":200,"response.statusCode":200,"httpResponseCode":"200","request.uri":"/signup","request.method":"GET","request.headers.host":"REDACTED.com","request.headers.accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9"}],[{"type":"Transaction","name":"WebTransaction/Action/generated::Z7mZPkw5PDQzj3ra","timestamp":1618546613.36192,"duration":0.09099,"totalTime":0.09099,"nr.guid":"783159856c2611e7","nr.apdexPerfZone":"S","nr.tripId":"783159856c2611e7","nr.pathHash":"2678fa52","nr.alternatePathHashes":"8b744442","databaseDuration":0.00792,"databaseCallCount":27,"error":false},{},{"response.headers.contentType":"application/json","http.statusCode":200,"response.statusCode":200,"httpResponseCode":"200","request.uri":"/workbiter/dashboard/calendar","request.method":"GET","request.headers.host":"REDACTED.com","request.headers.accept":"application/json, text/plain, /"}],[{"type":"Transaction","name":"WebTransaction/Action/generated::2AiIskh9n1KIT9cp","timestamp":1618546613.87929,"duration":0.03500,"totalTime":0.03500,"nr.apdexPerfZone":"S","databaseDuration":0.00061,"databaseCallCount":3,"error":false},{},{"response.headers.contentType":"text/html","http.statusCode":302,"response.statusCode":302,"httpResponseCode":"302","request.uri":"/auth/oauth-login/Facebook","request.method":"GET","request.headers.host":"example.com","request.headers.accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9"}]]]}

The workaround provided in forum post, adding middleware that manually sets webtransaction for newrelic extension solves the problem.

from newrelic-php-agent.

yohangdev avatar yohangdev commented on September 28, 2024

This issue also happen on Laravel 8. How to reproduce is to activate caching routes, example: php artisan optimize.

Transaction name will like this: generated::lXV9XhYeFMmMfxjI (recorded on NewRelic APM).

{
  "action": "App\\Http\\Controllers\\HomeController",
  "method": "GET",
  "name": "generated::lXV9XhYeFMmMfxjI",
  "url": "/"
}

from newrelic-php-agent.

Fahmy-Mohammed avatar Fahmy-Mohammed commented on September 28, 2024

Fixed in #174

from newrelic-php-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.