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

Clickhouse Plugin : Support to show Loki logs corresponding for traces in clickhouse

Open shivtej-opsverse opened this issue 10 months ago • 1 comments

What happened:

I am using Grafana:10.4.0. I send my application traces to clickhouse via the opentelemetry clickhouse exporter and use Loki with s3 as storage for Logs. I have added both these datasources into Grafana. Whenever I see a trace there is an option to show logs related to that particular trace this however redirects to the same clickhouse datasource saying To enable data linking, enter your default logs configuration in your ClickHouse Data Source settings

What you expected to happen:

configure this logs configuration so that it will redirect to Loki the datasource instead?

How to reproduce it (as minimally and precisely as possible):

  1. Prerequisite your logs should be going to loki and the traces should be going to clickhouse. Both these datasources should be added in Grafana.
  2. Go to the explore section of Grafana select clickhouse datasource and view any trace.
  3. Click on the hyperlink on the trace which says Show Logs it will give the above mentioned error.

Environment:

  • Grafana version: 10.4.0
  • Plugin version: 4.0.6
  • OS Grafana is installed on: Linux amd64
  • User OS & Browser: macOS and chrome

shivtej-opsverse avatar Apr 22 '24 08:04 shivtej-opsverse

Currently, the CH plugin can only show logs from the same CH plugin. I am relabeling this as a feature request.

bossinc avatar May 06 '24 21:05 bossinc

You can try using correlations. This should work for explore view, but for dashboard view you can use variables with manually added data links.

Let me know if this works for you

SpencerTorres avatar Aug 23 '24 16:08 SpencerTorres

I've had time to test correlations myself, and it indeed works well for linking different data sources. If you have trouble using this feature feel free to open a new issue with those details. Thanks!

SpencerTorres avatar Aug 29 '24 02:08 SpencerTorres