jmgilman / vaultrs

An asynchronous Rust client library for the Hashicorp Vault API
https://docs.rs/vaultrs
MIT License
97 stars 60 forks source link

feat: add tracing support. #10

Closed fourbytes closed 3 years ago

fourbytes commented 3 years ago

Thought I'd take a shot at this one. Closes #8.

I've added spans to every operation I can find, but I haven't added any additional log messages yet.

Looks like it would be good to implement this in the rustify crate as well. In Client::execute for example.

jmgilman commented 3 years ago

Thanks for this PR :) If you're up for it, I had planned on adding tracing output to the tests as well, using something like tracing-test but also open to other suggestions. Otherwise, I'm fine to accept this as-is.

fourbytes commented 3 years ago

Sounds good, will add that today.

fourbytes commented 3 years ago

How's this? I've instrumented each test and added a couple log messages to get it started. Using tracing-test at the moment to configure the subscriber, but it couple be easily replaced with an alternative in the future if necessary.

jmgilman commented 3 years ago

Awesome, thanks for doing that! Looks like you just need to run cargo fmt and I can merge :)

fourbytes commented 3 years ago

Done, that should do it.