kiwicom / structlog-sentry

Sentry integration for structlog
MIT License
103 stars 28 forks source link

V2.0.0 breaks formatting for lambda #160

Open dephiros opened 1 month ago

dephiros commented 1 month ago

We tried to update the library to 2.0.0 but run into an issue where event sent from lambda no longer get formatted correctly.

Previously we use SentryJSONProcessor which is updated to SentryProcessor We configure Sentry per the doc here: https://github.com/kiwicom/structlog-sentry?tab=readme-ov-file#logging-as-json

Example of previous message as seen on sentry:

Message
process_scheduled_message.message_not_handled

After the update the message becomes

Message
{'event': 'process_scheduled_message.message_not_handled', 'dd.trace_id': '4813741850791478619', 'dd.span_id': '13971470814306166836', 'dd.env': 'production'}

Somehow the JSON now is interpreted as a string.

Appreciate your help