victorialogs-datasource icon indicating copy to clipboard operation
victorialogs-datasource copied to clipboard

Grafana show context support

Open clrxbl opened this issue 1 year ago • 2 comments

This is a feature suggestion. Grafana Loki allows you to show the context, so the log lines before/after a specific log line you click on. It would be very useful if VictoriaLogs could do this aswell.

Example: CleanShot 2024-07-05 at 02 50 17@2x

CleanShot 2024-07-05 at 02 51 22@2x

clrxbl avatar Jul 05 '24 00:07 clrxbl

Can be implemented via https://docs.victoriametrics.com/victorialogs/logsql/#stream_context-pipe

hagen1778 avatar Jul 08 '24 07:07 hagen1778

I'm +1 on this feature. I have very little knowledge about plugin development for grafana. How hard it will be to parse existing user query and inject stream context pipe in it like @hagen1778 suggested?

Andrey36652 avatar Sep 06 '24 01:09 Andrey36652

The default, show context only support loki, es etc. if implement it , we need to implement the interface getLogRowContext(row: LogRowModel, options?: LogRowContextOptions, query?: SQLQuery)

worker24h avatar Nov 20 '24 09:11 worker24h

@dmitryk-dk @Loori-R I think this enhancement requires changes on both: backend and frontend.

hagen1778 avatar Nov 21 '24 09:11 hagen1778

@dmitryk-dk @Loori-R I think this enhancement requires changes on both: backend and frontend.

No, it is only frontend. I can commit a PR for this, I am developing it. @hagen1778

worker24h avatar Nov 21 '24 10:11 worker24h

Hi @clrxbl ! The feature was added in the v0.16.0 release.

dmitryk-dk avatar Mar 14 '25 09:03 dmitryk-dk