Five point releases later, I am almost confident to say it's ready: a Bunyan formatter for @tokio_rs's tracing
It took me two days, a bunch of poisoned Mutexes and some head scratching, but it now works as expected
https://github.com/LukeMathWalker/tracing-bunyan-formatter …
-
Show this thread
-
It replaced slog on the actix_web API I have been working. I now have the same output format for console logs, but I get distributed tracing instrumentation for free using the OpenTelemetry Subscriber
1 reply 0 retweets 2 likesShow this thread -
The #[instrument] macro is quite convenient and with the timer I embedded in the JsonStorageLayer I get most of the information I need out of the box.
1 reply 0 retweets 0 likesShow this thread -
The journey was not smooth sail though: I was not so pleasantly surprised when I found out that `insert` on `extensions` panics if there is already a value with the same type registered.
2 replies 0 retweets 0 likesShow this thread -
Replying to @algo_luca
sorry if this was surprising! the documentation should state this clearly and suggest using `replace` if a value already exists — if that isn't clear from the docs, we should definitely fix that
1 reply 0 retweets 0 likes -
Replying to @mycoliza
The docs are indeed clear on the point, but my mental picture of Extensions was basically that of a HashMap with types as keys. Thus I intuitively expected the API to behave the same if that makes sense
2 replies 0 retweets 0 likes -
Replying to @algo_luca @mycoliza
I didn't catch immediately because in sync code you generally enter a span only once. Then I plugged it into the actix_web app with tracing-futures and every integration test started to panic
I started to troubleshoot and I eventually found out with the docs and backtrack :)1 reply 0 retweets 0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.