Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmarshalling error when using NRQL with FACET clause #1500

Closed
sirianni opened this issue Aug 9, 2023 · 1 comment
Closed

Unmarshalling error when using NRQL with FACET clause #1500

sirianni opened this issue Aug 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sirianni
Copy link

sirianni commented Aug 9, 2023

Description

nrql query returns an unmarshalling error when used with FACET clause.

Current behavior

newrelic nrql query -q 'SELECT latest(k8s.pod.memory.usage) FROM Metric FACET `k8s.pod.name` SINCE 3 MINUTES AGO TIMESERIES 1 MINUTE'
cannot unmarshal array into Go struct field NRDBResultContainer.data.Actor.Account.NRQL.otherResult of type nrdb.NRDBResult

Expected behavior

I expect the query to return data like it does in the browser.

@NSSPKrishna NSSPKrishna added the bug Something isn't working label Aug 31, 2023
@shashank-reddy-nr
Copy link

Hi @sirianni ,

This issue is similar to a known problem where the response from Nerd Graph (New Relic API gateway) varies based on the query used. Specifically, when using certain queries ex: when you use FACET and TIMESERIES in same query, the otherResult and totalResult values are returned as lists, while other queries return these values as objects.

To support both data types, we would need to restructure the datatype to an interface, which is a significant change given the fragility of the newrelic-client-go package, especially considering its use cases in the other repos. Therefore, we won't be able to support queries with FACET and TIMESERIES at once from CLI, this can be only queried from UI.

When we use FACET and TIMESERIES the nerdgraph response:

image

When we use just FACET the nerdgraph response:

image

@shashank-reddy-nr shashank-reddy-nr closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants