How do I create a derived field in Loki with structured metadata?

Say I have structured meta data that contains trace_id and I simply the log output so I don’t have the original log line anymore

How do I create a derived field?

Not quite sure what you are looking for, can you re-phrase?

Are you looking to just output the trace_id? Or combination of certain labels?

I want to create a link from traceId like this

but with data in the structured metadata rather than the log line

I see. I don’t know if that’s possible, hopefully someone with more knowledge on this can comment.

1 Like

Is there any update on this ? Having the links to traces in Tempo using Structured Metadata provided by native OTLP HTTP ingestion would be very useful. I’m surprised this isn’t already included, it seems like a very obvious thing to include for OTLP HTTP ingestion.