How do I log the APM headers in my dropwizard application

Hi,

I have a usecase where I want to log the apm related headers in my application log lines. My application is a simple dropwizard application , and in my config. yaml, I have configured this log fromat, I am not able to see the values in log lines

"%highlight(%-5level) %boldYellow([%d]) [%t] %green([%X{trace.id}]) %blue([%X{traceparent}]) %c - %m %ex%n"

Can you please tell me how to log the headers.

Also, can you please tell me how to explicitly access the headers in any application classes?

Hi and welcome to the forum!
Try following the log correlation documentation.
Did you set enable_log_correlation to true?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.