Closed dsabsay closed 3 months ago
Hi @dsabsay,
When you use Query1, the response from Nerd Graph(new relic API gateway) will look something as shown in Image1 below. If you observe image1, the otherResult and totalResult values are of list type. However, when you use Query2, the otherResult and totalResult values are of object type as shown in Image2.
As a consequence, If we want to support both data types then we would need to restructure the datatype to interface, which would be an extremely tedious change, given this is a fragile package, owing to its usecases especially in the CLI.
Hence, we won't be able to support Query1.
SELECT percentile(duration, 95) AS 'foobar' FROM Transaction FACET request.method TIMESERIES 1 hours SINCE '2024-01-17 14:51:00 +0000' UNTIL '2024-01-17 19:51:00 +0000'
SELECT percentile(duration, 95) AS 'foobar' FROM Transaction FACET request.method SINCE '2024-01-17 14:51:00 +0000' UNTIL '2024-01-17 19:51:00 +0000'
Description
When running a NRQL query that uses both
FACET
andTIMESERIES
, the library returns an error because it cannot encode the results into the structs.Go Version
go version go1.21.3 darwin/amd64
Current behavior
The following error is returned:
Expected behavior
The results are returned without error (as they are in the New Relic UI).
Steps To Reproduce
Set
NR_API_KEY
env var. Then use comments to try each of the 3 queries. The first one (with FACET and TIMESERIES) does not work.