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

traces to logs integration

Open hagen1778 opened this issue 9 months ago • 7 comments

Grafana Tempo supports Traces to Logs integration between Tempo datasource and limited list of logs datasources:

  • 'loki',
  • 'elasticsearch',
  • 'grafana-splunk-datasource', // external
  • 'grafana-opensearch-datasource', // external
  • 'grafana-falconlogscale-datasource', // external
  • 'googlecloud-logging-datasource', // external

It would be great to check if VictoriaLogs could fit the requirements for such an integration and file a PullRequest to Grafana to support VictoriaLogs as one of the available backends.

hagen1778 avatar Feb 17 '25 14:02 hagen1778

It'll be great!

luistilingue avatar Feb 17 '25 14:02 luistilingue

@hagen1778 @Loori-R There two place, that we need to modify, to get it works. Datasource config, as mentioned in Issue, and one some "smelling" piece of code here Probably, they will not accept any PR for this, without refactor SpanLinks mechanics

I experimented with this, for local grafana installation, and get it works, but... It's realy smells

090809 avatar Feb 18 '25 07:02 090809

Seems to me like it'd be worth a try! This would be a really great feature. 🤞

lauren-hinge avatar Mar 15 '25 18:03 lauren-hinge

@090809 Can you share how you got it working?

stanpalatnik avatar Mar 19 '25 03:03 stanpalatnik

FYI: @hagen1778 @stanpalatnik https://github.com/090809/grafana/tree/datasource/victoriametrics-logs-datasource https://github.com/grafana/grafana/commit/3b9d24a57a08b0631ba6dc749ff7f84e064bd771

Settings and usage images

p.s.: Im terrible at writing queries for VictoriaLogs, so the formatting of the tags may not be correct

Image Image

090809 avatar Apr 07 '25 23:04 090809

@090809 Do you mind trying to open a PR on grafana?

archef2000 avatar May 06 '25 17:05 archef2000

@archef2000 I assume it needs more work. Unit tests and such

spalatnik avatar May 09 '25 14:05 spalatnik

Opened a PR to add VictoriaLogs support to Trace-to-Logs: grafana/grafana#105985.
Thanks, @090809!

Loori-R avatar May 25 '25 18:05 Loori-R

Thanks everyone and @Loori-R - https://github.com/grafana/grafana/pull/105985 has been merged!

hagen1778 avatar Jul 12 '25 19:07 hagen1778

Quick update: we're waiting for a new Grafana release that will include this integration. Once it is out and everything is working fine - we'll be closing this issue.

hagen1778 avatar Aug 28 '25 11:08 hagen1778

Trace-to-logs feature wit support of VictoriaLogs datasource was included into Grafana v12.2.0:

Image

https://github.com/user-attachments/assets/ab937e4a-b8e7-43f5-93ce-bf49e3dee870

hagen1778 avatar Sep 24 '25 08:09 hagen1778

Closing this ticket as done.

hagen1778 avatar Sep 24 '25 08:09 hagen1778