From 99275b8093673aefeeda2f4376961e2237d87743 Mon Sep 17 00:00:00 2001 From: tilpner Date: Thu, 2 Dec 2021 15:59:49 +0100 Subject: [PATCH] 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; --- src/extensions/tracing.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/extensions/tracing.rs b/src/extensions/tracing.rs index fbdc0bde..97f257ed 100644 --- a/src/extensions/tracing.rs +++ b/src/extensions/tracing.rs @@ -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)