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](https://private-user-images.githubusercontent.com/1053421/337620485-71b89604-6ba7-40aa-9d5f-bf1e18e4c7a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0OTg5ODAsIm5iZiI6MTcxODQ5ODY4MCwicGF0aCI6Ii8xMDUzNDIxLzMzNzYyMDQ4NS03MWI4OTYwNC02YmE3LTQwYWEtOWQ1Zi1iZjFlMThlNGM3YTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTZUMDA0NDQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9M2UyZTEyMDQwYWUyOWU1MWI0MDU0ZjQ4OTA1NTg1Y2Y2NGI0NThhOTk4N2I5NzM2NjEzNjMzZWI1MDYzYTNmMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.4Vdtf9hkS51t9qMteEyv8MNVaGSoFzax2H5ZRFNRxzU)
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 ""