From b67ecfdda7f6619f868e33d41b72fc90ad1e10be Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 6 Sep 2023 23:34:58 -0400 Subject: [PATCH] opentelemetry: in Trace, change default span kind --- src/opentelemetry.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/opentelemetry.ml b/src/opentelemetry.ml index 411b1e20..9f5690f7 100644 --- a/src/opentelemetry.ml +++ b/src/opentelemetry.ml @@ -436,10 +436,11 @@ module Globals = struct List.rev_append (List.filter not_redundant !global_attributes) into (** Default span kind in {!Span.create}. - This will be used in all spans that do not specify [~kind] explicitly. + This will be used in all spans that do not specify [~kind] explicitly; + it is set to "internal", following directions from the [.proto] file. It can be convenient to set "client" or "server" uniformly in here. @since 0.4 *) - let default_span_kind = ref Proto.Trace.Span_kind_unspecified + let default_span_kind = ref Proto.Trace.Span_kind_internal let mk_attributes ?(service_name = !service_name) ?(attrs = []) () : _ list = let l = List.map _conv_key_value attrs in