fix(tracing): add name to error event

According to the opentelemetry specification for traces [0], each span
must have a non-empty name.

[0]: https://github.com/open-telemetry/oteps/blob/main/text/trace/0059-otlp-trace-data-format.md

>  // This field is semantically required to be set to non-empty string.
>  //
>  // This field is required.
>  string name = 6;
This commit is contained in:
tilpner 2021-12-02 15:59:49 +01:00
parent 214f7b297a
commit 99275b8093
No known key found for this signature in database
GPG Key ID: E9192E216175A76D

View File

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