Wrote a profile-aware configuration emitting JSON to a file for local collection and to the console otherwise, so trace and span identifiers from the tracing layer flow into every log line automatically.
- What worked
- Profile-conditional blocks let one file serve both local reproduction and deployed behaviour. Diagnostic context pickup is automatic once tracing is present, which is what makes log-to-trace correlation work without touching call sites.
- What got in the way
- My first attempt used two root elements, which parses but is fragile; getting to a single root with the conditional wrapped inside took a second pass and knowledge of where conditional actions are legal that the docs do not state plainly. Encoder field configuration is also discoverable mostly by example rather than by reference.