Highlight missing in 9.0.5

  • What Grafana version and what operating system are you using?
    I’m using Chrome on a Macbook and the highlight behavior has changed between Grafana 8.3.5 and 9.0.5.

  • What are you trying to achieve?
    When I select a log level and/or search term, the matching result should be highlighted in the logs view.

  • How are you trying to achieve it?
    I have 4 drop-down (3 queries, 1 enum) variables and a search box. This query works fine in both 8.3.5 and 9.0.5 EXCEPT 9.0.5 does not show the highlights.

  • What happened?
    Highlights are missing

  • What did you expect to happen?
    I expect that the highlighting would work in both versions, or receive some sort of error message.

  • Can you copy/paste the configuration(s) that you are having problems with?

{
  "__inputs": [
    {
      "name": "DS_LOKI-STACK",
      "label": "Loki-stack",
      "description": "",
      "type": "datasource",
      "pluginId": "loki",
      "pluginName": "Loki"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.0.5"
    },
    {
      "type": "panel",
      "id": "logs",
      "name": "Logs",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 3,
      "panels": [],
      "title": "Log Viewer",
      "type": "row"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${DS_LOKI-STACK}"
      },
      "gridPos": {
        "h": 14,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 1,
      "options": {
        "dedupStrategy": "none",
        "enableLogDetails": true,
        "prettifyLogMessage": false,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": false,
        "sortOrder": "Descending",
        "wrapLogMessage": false
      },
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${DS_LOKI-STACK}"
          },
          "editorMode": "code",
          "expr": "{pod=~\"$pod\",component=~\"$component\",namespace=~\"$namespace\"} |~ `(?i)$logLevel` |~ `(?i)$search`",
          "key": "Q-61c5548f-f390-4e80-8a6a-f0974fc33259-0",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "$component Logs",
      "type": "logs"
    }
  ],
  "schemaVersion": 36,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "loki",
          "uid": "${DS_LOKI-STACK}"
        },
        "definition": "label_values({namespace=~\".+\"},namespace)",
        "hide": 0,
        "includeAll": true,
        "label": "Namespace",
        "multi": true,
        "name": "namespace",
        "options": [],
        "query": "label_values({namespace=~\".+\"},namespace)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "loki",
          "uid": "${DS_LOKI-STACK}"
        },
        "definition": "label_values({component=~\".+\", namespace=~\"$namespace\"},component)",
        "hide": 0,
        "includeAll": true,
        "label": "Component",
        "multi": true,
        "name": "component",
        "options": [],
        "query": "label_values({component=~\".+\", namespace=~\"$namespace\"},component)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "loki",
          "uid": "${DS_LOKI-STACK}"
        },
        "definition": "label_values({pod=~\".+\",component=~\"$component\"},pod)",
        "hide": 0,
        "includeAll": true,
        "label": "Pod",
        "multi": true,
        "name": "pod",
        "options": [],
        "query": "label_values({pod=~\".+\",component=~\"$component\"},pod)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "hide": 0,
        "includeAll": true,
        "label": "Log Level",
        "multi": true,
        "name": "logLevel",
        "options": [
          {
            "selected": true,
            "text": "All",
            "value": "$__all"
          },
          {
            "selected": false,
            "text": "DEBUG",
            "value": "DEBUG"
          },
          {
            "selected": false,
            "text": "ERROR",
            "value": "ERROR"
          },
          {
            "selected": false,
            "text": "WARN",
            "value": "WARN"
          },
          {
            "selected": false,
            "text": "TRACE",
            "value": "TRACE"
          },
          {
            "selected": false,
            "text": "INFO",
            "value": "INFO"
          }
        ],
        "query": "DEBUG,ERROR,WARN,TRACE,INFO",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "current": {
          "selected": false,
          "text": "",
          "value": ""
        },
        "hide": 0,
        "label": "Search",
        "name": "search",
        "options": [
          {
            "selected": true,
            "text": "",
            "value": ""
          }
        ],
        "query": "",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Explore Test",
  "uid": "Xq2Pu784z",
  "version": 10,
  "weekStart": ""
}
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No errors were returned.

  • Did you follow any online instructions? If so, what is the URL?
    Just exported my dashboard and re-imported into Grafana 9.0.5 and noticed the highlights were missing.