RFC: Metadata providers, swift-log and distributed-tracing interop

Hello everyone,
@slashmo and myself worked on a proposal to swift-log that would enable the long promised automatic interop between logging and tracing.

This is only made possible due to many things coming together: task-local values, the distributed tracing and baggage libraries, and the new metadata providers feature proposed for swift log. Thanks to all those, a simple log statement like:

log.info("Handling request")

can automatically include trace information, like so:

info [trace-id: 1234-1234, request-path: /hello, request-method: GET] Handling request

and also propagate through Swift concurrency concepts automatically.

If you'd like to give this new feature a review, here is the proposal and feature PR: RFC: Metadata Providers & Distributed Tracing Support in swift-log by slashmo · Pull Request #235 · apple/swift-log · GitHub

With this, and some refresh of the tracing library docs we are anticipating being able to launch a 1.0 of swift-distributed-tracing very soon

8 Likes