grafana / explore-logs

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

feat(pattern): add a tooltip for each fields that shows statistics about the field. #484

Closed cyriltovena closed 2 months ago

cyriltovena commented 3 months ago

This adds a clickable tooltip for each fields in found patterns. The tooltip shows statistics about the last 2k found samples.

This PR also refactor Patterns component into their own folder.

image
matyax commented 3 months ago

Hey @cyriltovena . Are you expecting our review here? Just asking because there are no assigned reviewers, and I missed this one.

cyriltovena commented 3 months ago

Please yes ! Don't hesitate to let me know what I can improve, I'm still learning frontend.

gtk-grafana commented 3 months ago

0 results found:

image image

Ideally we could not make this linkable, but we likely don't know beforehand?

gtk-grafana commented 3 months ago

Duration split up by the decimal:

image image image

Again not sure we can do anything here, but knowing the distribution of decimals is not helpful to the user.

gtk-grafana commented 3 months ago

Another design question, but not something that needs to be addressed in this PR:

image image image image

Should other be given a special treatment, or hardcoded placement, instead of always sorting by percentage? @zizzpudding

gtk-grafana commented 3 months ago

Keyboard nav works, which is awesome, and it works as expected, except that opening a modal with keyboard doesn't close existing one like the mouse UX

image
matyax commented 3 months ago

Love the feature!

I'm curious if we can do a better job explaining this distribution, because it can be challenging to understand what this means.

imagen

Maybe we can just let the user know that "this just has many many values".

gtk-grafana commented 3 months ago

Maybe we can just let the user know that "this just has many many values".

I like that it still shows example values, but I agree that there should be a better way to show the user that the cardinality of these values is maxed out

cyriltovena commented 3 months ago

feedback from @matryer should we just show % without the bar ?

cyriltovena commented 3 months ago

Duration split up by the decimal: image image image

Again not sure we can do anything here, but knowing the distribution of decimals is not helpful to the user.

We're working on this on the backend side. Spotted that one too recently.

matyax commented 3 months ago

I'll take care of the review comments.

matyax commented 2 months ago

Most, or all, comments and issues have been addressed.

matyax commented 2 months ago

BTW, can't merge this one because of the requested changes.