Is NRQL appName queries from and/or to the app?

Suppose I have an app in our environment called ‘aaa’ (let’s keep this simple). This app interfaces with a lot of external systems. Suppose one of those systems sends us an error message with the word ‘broken’ in it that we need to respond to:

SELECT * FROM TransactionError WHERE appName = ‘aaa’ and Description like ‘%broken%’

How does NR view this query? Is this only going to find error messages from ‘aaa’ that include the word ‘broken’ AND/OR is this going to find errors from external systems that include the word ‘broken’?

Hi, @david.miller1: It will find errors from aaa that include the word “broken” and, by default, only if they were unhandled exceptions.

How do I find errors from the external services TO ‘aaa’?

If they are services that you own, you may deploy New Relic APM to monitor them as separate applications. If they are third-party services, I don’t think it is possible to see their internal error information.

We are getting back the error information. It’s a REST call to the 3rd-party services.

When you get the error information, can you re-throw the error in your application? Or call noticeError() to send the error info to New Relic? Which APM agent(s) are you using?

Okay, I think I’m starting to track with you. The error message we are seeing would be returned in the HTTP Response from the 3rd-party service. I would query that to track it down. Now, that said, when I query the Transaction table, I don’t see a column that contains the HTTP Response from the 3rd-party service. Did I miss it?

By default, New Relic only records unhandled errors. If you are handling the error in your code, you must call newRelic.noticeError() to send the error details to New Relic. If you tell me which agent you are using, I can point you to specific documentation.

1 Like

Is this query a reliable way to find the agent versions? I’m asking because I don’t see all applications listed. I found this query in the forums:

SELECT apmAppName, apmAppId, apmLanguage, apmAgentVersion FROM NrDailyUsage WHERE productLine = ‘APM’ AND usageType = ‘Application’ since 1 day ago

I can tell you that the agent was updated at the end of December, 2020.

Now, all that said, let me simplify my question. I’m wondering if NR is logging all outgoing 3rd-party REST calls and responses from/to the application in question. If so, I should be able to query the 3rd-party responses for the error message particulars I’m after.

New Relic APM supports 8 different programming languages: Java, .NET, Node, Python, Ruby, PHP, Go, and C/C++. I am asking which language agent you are using. :slight_smile:

No, by default New Relic does not log individual external service calls. If your application gets an error back from a service, you may call noticeError() to send the error to New Relic, or add information about the service call as a custom event.

Phil, in this particular case, it’s Java.

I think you answered my question.

Without a doubt, you are definitely “NR Education”! :slight_smile:

OK. Here is the documentation on calling noticeError() from Java: