Closed
Description
Expected Behavior
In our code we have nicely formatted JSON logs as recommended in https://docs.datadoghq.com/logs/log_collection/python/?tab=jsonlogformatter
We inject quite a bunch of data in the logging extra
kwarg to be able to search for logs efficiently. Injecting the tracing information by setting DD_LOGS_INJECTION=True
should not mess with this log format or at least include all information that got passed as extra
.
Actual Behavior
As soon as we enable DD_LOGS_INJECTION
, the log format is changed to a single line log format. This format only includes the original message and the tracing information but drops the information we pass in extra
.
Steps to Reproduce the Problem
- configure your logging as recommended in https://docs.datadoghq.com/logs/log_collection/python/?tab=jsonlogformatter
- log something by providing additional logging information in the
extra
keyword. - check logs. they should be nice json with all data provided in
extra
- set
DD_LOGS_INJECTION=True
- log something by providing additional logging information in the
extra
keyword. - check logs. they should be nice json with all data provided in
extra
but only logging message is included and log format changed to single Line
Specifications
- Datadog Lambda Layer version:
- Python version: 3.8