Skip to content

Improve NRQL query UX and error messages #51

@piekstra

Description

@piekstra

Problem

The NRQL interface has confusing command structure and could have better error messages.

Issues Encountered

1. Nested command structure is non-obvious:

# This doesn't work:
$ newrelic-cli nrql "SELECT * FROM Log..."

# Must use:
$ newrelic-cli nrql query "SELECT * FROM Log..."

2. Time range flags vs NRQL syntax confusion:

# Tried (doesn't work):
$ newrelic-cli nrql query "SELECT..." --since 7d

# Must embed in query:
$ newrelic-cli nrql query "SELECT... SINCE 7 days ago"

Proposed Enhancements

  1. Accept query as direct argument to nrql subcommand (shortcut for common case)
  2. Add --since and --until flags that inject into the NRQL query automatically
  3. Better error messages when command structure is wrong: "Did you mean 'nrql query'?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions