Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-3042

Logging view plugin removes part of LogQL query

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Hide
      Before this update, an error in the query parser of the logging view plugin caused parts of the logs query to disappear, if the query contained curly brackets. This made the queries invalid, leading to errors being returned for valid queries. With this update, the parser correctly handles these queries.
      Show
      Before this update, an error in the query parser of the logging view plugin caused parts of the logs query to disappear, if the query contained curly brackets. This made the queries invalid, leading to errors being returned for valid queries. With this update, the parser correctly handles these queries.
    • Log Storage - Sprint 224

      When doing the following query in the logging view:

      { log_type =~ ".+" } | json | line_format "{{.message}}"
      

      I get the following error from the server:

      parse error at line 1, col 3: syntax error: unexpected ., expecting IDENTIFIER
      

      Looking into the Chrome developer tools I can see that the query to the gateway does not contain the full query, but just part of it (only query part of URL):

      ?query=%7B+.message+%7D+%7C+%7D%22&start=1662571791618000000&end=1662575391618000000&limit=200
      

      This would translate to this query:

      { .message } | }" 

      My assumption is that this is because of the greedy match in the LogQL parsing code.

            gbernal@redhat.com Gabriel Bernal
            rojacob@redhat.com Robert Jacob
            Anping Li Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: