Implement telemetry events serializer and unpacker as processors
Opened this issue · 0 comments
dacabdi commented
The current mechanism to unpack structured event dataclasses and selective serialize their fields is not natural to the structlog
workflow. We are using the xhoundpi.bound_logger_events.BoundLoggerEvents
class to provide a custom logger that does the work before calling on the wrapped logger (see structlog
bound loggers). A more portable and appropriate solution would be to shim event processors (see structlog
event processors) in the highest layer of the stack and let it do the work regardless of the underlying bound logger.