To have log events and trace correlation on Datadog when using the automatic instrumentation provided by the DD agent,
it requires setting a log4j context like:
This can be done on our TracingWebFilter.
Note, that the correlation is only available on the thread that is executing the HTTP request and is not available on any async processing related to the query.
This is ok since the automatic instrumentation is not able to trace any async processing.
In order to trace with the Nuxeo tracing instrumentation that includes the async processing the Nuxeo DD reporter needs to be activated, since
NXP-30788 the trace identifiers are propagated to the log.