grafana / explore-logs

Repo for the Loki log exploration app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discussion: should we make pattern placeholders look different to `<_>`?

matryer opened this issue · comments

Feedback: I have a hard time visually identifying the patterns. It took me a while to under stand that <_> was a placeholder. Is it possible to signify this in some other way, with either color, font weight, underline or something of the sorts?

@matryer: I had the same idea during hackathon week, these are nice if you're working with queries etc. but in this context, they are difficult to interpret.

Idea:

What if we showed a selection of examples on hover? Or what if we picked an example to use as the placeholder, which again you could click and see other popular examples.

100% we should find something that works better visually

We could use LogQL to get a sample of values like this.

image

The idea is to replace one <_> with <key> inside the | pattern parser and then only keep that extracted label with | keep key and then remove the log content to avoid downloading too much data with | line_format ""