Merge pull request #515 from flisky/fix-instrument

fix: call instrument span later
This commit is contained in:
Sunli 2021-05-19 11:12:27 +08:00 committed by GitHub
commit 74c42e5782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,11 +137,11 @@ impl Extension for TracingExtension {
return_type = %info.return_type, return_type = %info.return_type,
); );
next.run(ctx, info) next.run(ctx, info)
.instrument(span)
.map_err(|err| { .map_err(|err| {
tracinglib::error!(target: "async_graphql::graphql", error = %err.message); tracinglib::error!(target: "async_graphql::graphql", error = %err.message);
err err
}) })
.instrument(span)
.await .await
} }
} }