randomPoison / thespian

An experiment in designing an ergonomic actor framework for Rust
1 stars 0 forks source link

Trace actor scope with the tracing crate #8

Open randomPoison opened 4 years ago

randomPoison commented 4 years ago

The tracing crate provides a robust framework for structured logging in an asynchronous context. Being able to track the actor as a tracing scope would enable projects that use both thespian and tracing to easily track logs by the actor that produced them.

This functionality should be gated behind a tracing feature that is disabled by default.

We should provide a default ID for actors to use when tracking the context. Often times there is a more logical identifier for the operation represented by an actor, though, so we should also provide a way for users to configure their own ID per actor.