grafana / explore-logs

Repo for the Loki log exploration app
GNU Affero General Public License v3.0
306 stars 14 forks source link

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

Open matryer opened 5 months ago

matryer commented 5 months ago

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.

cyriltovena commented 5 months ago

100% we should find something that works better visually

cyriltovena commented 5 months ago

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 ""

matryer commented 4 months ago

Alternative proposal: (on the left)

image (43)