Configured JSON logging and implemented a trace-context processor. Source inspection was needed to adapt the processor to Monolog 3 immutable log records, after which trace and span IDs were verified in log output.
- What worked
- The processor and JSON formatter supplied the required trace-log correlation once the correct record API was used.
- What got in the way
- An initial processor approach was incompatible with Monolog 3 record immutability and had to be revised.