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

feat(api)!: Fail log queries when executed on instant query endpoint #13421

Merged
merged 6 commits into from
Jul 5, 2024

Commits on Jul 4, 2024

  1. feat: Fail request when log selector expression is used as instant query

    A log selector expression is a LogQL expression for returning logs, in
    contrast to sample expressions, which return metrics. The simplest form
    of log selector expressions are label matchers, e.g. `{env="prod"}`.
    
    This PR changes the behaviour of Loki so it does not allow using a log
    selector expression when the instant query endpoint `/api/v1/query` is
    queried.
    
    Previously this endpoint allowed these types of log queries, but returns
    inconsistent results, which where a major cause for confusion. Returning
    a concise error helps the user understand that they likely selected the
    wrong query type in Grafana when executing the query.
    
    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    d07ba7c View commit details
    Browse the repository at this point in the history
  2. fixup! feat: Fail request when log selector expression is used as ins…

    …tant query
    
    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    48524d6 View commit details
    Browse the repository at this point in the history
  3. fixup! fixup! feat: Fail request when log selector expression is used…

    … as instant query
    
    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    24b80b8 View commit details
    Browse the repository at this point in the history
  4. Improve error message to be more user centric

    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    d23d436 View commit details
    Browse the repository at this point in the history
  5. fixup! Improve error message to be more user centric

    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    a4336ea View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. Update API documentation

    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    99178a6 View commit details
    Browse the repository at this point in the history