Propogate Span into bcrypt verify

This commit is contained in:
asonix 2022-11-23 11:58:44 -06:00
parent 68a0b7c574
commit c6adc9f77b

View file

@ -61,7 +61,8 @@ impl Admin {
hashed_api_token: Data<AdminConfig>,
x_api_token: XApiToken,
) -> Result<(), Error> {
if actix_web::web::block(move || hashed_api_token.verify(x_api_token))
let span = tracing::Span::current();
if actix_web::web::block(move || span.in_scope(|| hashed_api_token.verify(x_api_token)))
.await
.map_err(Error::canceled)??
{