Problem/Motivation

We have enabled this module in our dev and stage servers(acquia cloud). Both are with newrelic php extension. Enabled this module and added API key of type 'user' from newrelic and doing the deployments. These deployments are success and we are able to see the deployment details at Newrelic side. But the problem is it is not forwarding the watchdog messages. We have enabled all the watchdog messages type in this module settings page.

We have added the below code in our settings.php. Verified with and with out this below code, but no luck.
ini_set('newrelic.loglevel', 'error');
ini_set('newrelic.daemon.collector_host', 'gov-collector.newrelic.com');

Are we missing anything to forward the watchdog messages to newrelic. Is it any permission issue? or do we need to install anything on servers.

Steps to reproduce

  • Enabled new_relic_rpm module
  • Generated API key of 'user' type in newrelic
  • Enabled all watchdog message types in module settings page.
  • Use deploy page by giving some version and other details.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bhavanasisarath created an issue. See original summary.

steven jones’s picture

Assigned: Unassigned » steven jones

I had this issue too, and it's because the module is passing a NULL to as the second argument to newrelic_notice_error which isn't a valid thing to do.

MR on the way...

steven jones’s picture

Status: Active » Needs review

MR is open and ready for review!

steven jones’s picture

Assigned: steven jones » Unassigned
diego_mow’s picture

Status: Needs review » Reviewed & tested by the community

Tested this code in our project and it works! Thank you!
RTBC

icurk’s picture

@diego_mow
Where exactly in newrelic do you see logs from watchdog? Did you have to set anything else in newrelic to get this working?

steven jones’s picture

They'll be in the standard error inbox in NewRelic APM.

icurk’s picture

@steven jones
I only see errors that are thrown with an exception, but I don't see any other items from the watchdog, like items with debug or info severities.

steven jones’s picture

Have you configured the new_relic_rpm module to send relevant watchdog messages to NewRelic, and applied the patch in the Merge Request?

icurk’s picture

I did, yes.

I have:

  • Enabled new_relic_rpm module
  • Generated API key of 'user' type in newrelic
  • Set newrelic.license to the API key
  • Enabled all watchdog message types in module settings page.

If I try to deploy a message in the deployment tab, I see this in the errors inbox. I'm just missing the watchdog logs.

EDIT: I've changed the type of the key to INGEST - LICENSE and now I see them.

steven jones’s picture

Sorry to confirm, but in your detailed steps, you didn't mention applying the code change from the merge request here, have you done that?

https://git.drupalcode.org/project/new_relic_rpm/-/merge_requests/3/diffs

  • steven jones committed 56a8d8c3 on 2.x
    fix: #3360583 Watchdog messages are not forwarding to Newrelic
    
    By:...
steven jones’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks everyone!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.