newrelic-cli icon indicating copy to clipboard operation
newrelic-cli copied to clipboard

Entity Search Not Returning All Results

Open jospdeleon opened this issue 3 years ago • 5 comments

Description

If I run the graphQL request below, I get a count of 1305. But if I make the same command in the CLI, it only gives me 200 which makes me think that the CLI is not doing any recursion in the background. However, I don’t see an option in the CLI to “force” it to make recursive calls. I'm using the same API key in the GraphQL request as what's set in my newrelic profile.

{
  actor {
    entitySearch(queryBuilder: {domain: APM, reporting: true}) {
      count
    }
  }
}

Result is:

"data": {
    "actor": {
      "entitySearch": {
        "count": 1305
      }
    }
  }

CLI command and output:

$ newrelic entity search --domain APM --reporting true |  jq length
200

Go Version

go version go1.15.8 darwin/amd64

Current behavior

Please see description above.

Expected behavior

Expected behavior is that I should get the same results for both the graphql call and the cli command.

Steps To Reproduce

Steps to reproduce the behavior:

  1. I have encountered this bug with newrelic version 0.35.2
  2. I downloaded a much older version newrelic version 0.13.0 that I know is working correctly. I don't know when the bug was introduced.
  3. This is the output from the older version, which matches the graphql result:
newrelic-cli_0.13.0_Darwin_x86_64 $ ./newrelic entity search --domain APM --reporting true | jq length
1305

jospdeleon avatar Sep 24 '21 21:09 jospdeleon

I'm experiencing the same issue with version 0.36.6, it doesn't seem that we are using the cursor capability from GraphQL :(

aminoz007 avatar Oct 01 '21 04:10 aminoz007

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Oct 15 '21 23:10 stale[bot]

This issue has been automatically closed due to a lack of activity for an extended period of time.

stale[bot] avatar Oct 23 '21 07:10 stale[bot]

This was closed but it was not fixed. Tested with the latest version newrelic version 0.42.2

aminoz007 avatar Mar 11 '22 02:03 aminoz007

Relates to: #138

NRhzhao avatar May 22 '23 16:05 NRhzhao