OpenTelemetry: linking log trace and metrics with TraceID not in log line

Grafana - Grafana v10.4.7 (8d068faebe)

In our organization, Opentelemetry is the only way to send logs, traces, matrics to Grafana
Framwork: Spring java

I’ve used OpenTelemetryAppender to send logs but the issue with appender is it is not adding traceid and spanid in log line rather it is coming as field attribute(Screenshot)

To get the value from log I am using below derived field

Trace to Log

I tried with and without custom query but nothing seems working

  1. How to get this attribute trace_id so I can link Log to trace and visa versa.
  2. I am also trying to link Trace to Log, and Trace to Matrics.