Can't mix APM Metric and Custom Metric in NRQL

Hi,

This NRQL request return a value for apm and no value for custom:

FROM Metric SELECT
filter(average(apm.service.transaction.duration), WHERE appName like ‘%’) as apm,
average(sequence.latency) as custom

It should return a value for custom.
Is this a limitation?

This one return a value for apm:

FROM Metric SELECT filter(average(apm.service.transaction.duration), WHERE appName like ‘%’) as apm

This one return a value for custom:

FROM Metric SELECT average(sequence.latency) as custom

This one return a value for custom1 and custom2:

FROM Metric SELECT
average(threadPool.latency) as custom1,
average(sequence.latency) as custom2

Thanks

Hi @leonard_billich, I’m currently researching what the expected behavior should be when querying APM metrics in conjunction with other metrics or data types.

I’ll let you know once I have an update!

I’ve found an alternative solution:

FROM Transaction, Metric SELECT
filter(average(duration), WHERE appName like ‘%’) as apm,
average(sequence.latency) as custom

With this request apm and custom have a value.

It would be great to be able to do it only with “FROM Metric”.

Hi @leonard_billich, could you actually send me a link to that query? (Only New Relic employees will be able to access this data.)

I want to see what it’s doing under-the-hood. From my investigation, it may not be possible (at this time) to query APM metrics and other data types together in a single query, so I’d be curious to inspect this query further.

Ah, okay, I see what you’re doing now — you’re combining Transaction data with dimensional metrics, when you’d like to query dimensional metrics and APM timeslice metrics in a single query.

Unfortunately, that’s not possible at this time. If a query uses either the newrelic.timeslice.value metric or one of the apm.* metrics, it will be routed to a service that only returns data for timeslice metrics.

I’m going to leave a note with our technical writing team to add this limitation to our docs, so that it’s at least made more evident.

I hope that helps clarify things, @leonard_billich, but please do let us know if you have further questions.

Ok thanks for the clarification.

Looks like its possible to add more than one query to a chart now. You might be able to simply create two queries and combine them in the chart. The only issue is that it appears you can only do this with timeseries.

Do you have an example of the syntax?

Its not a syntax thing. Its a UI selection.

Ok thanks, I’ve missed that.

You aren’t alone. I’m not sure we are getting release notes or notifications on incremental changes to NR1.

In NR1 there is a section called “What’s New” that you can access by clicking on your profile (pic below). This is a great way to get recent updates. Also follow the tag "productupdate" in the community.

1 Like

Out of curiosity was the change discussed detailed in the what’s new area?

I don’t see it in “What’s New” but I see it on the tag productupdate in the forum:
https://discuss.newrelic.com/t/new-feature-multiple-queries-in-one-widget/108421

Thanks for that. I’d hope for updates in release notes with links to more verbose discussion. It would be very tedious to click and read forum posts.

@leonard_billich Thanks for sharing that link!