From e78946247f6d31906f1e602fd9cbc71cdec4e428 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 24 Oct 2024 18:44:28 -0400 Subject: [PATCH] add optional args to Span_link.of_span_ctx --- src/core/opentelemetry.ml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/opentelemetry.ml b/src/core/opentelemetry.ml index 0b03ee6..6908d98 100644 --- a/src/core/opentelemetry.ml +++ b/src/core/opentelemetry.ml @@ -782,7 +782,12 @@ module Span_link : sig unit -> t - val of_span_ctx : ?attrs:key_value list -> Span_ctx.t -> t + val of_span_ctx : + ?trace_state:string -> + ?attrs:key_value list -> + ?dropped_attributes_count:int -> + Span_ctx.t -> + t end = struct open Proto.Trace @@ -799,9 +804,10 @@ end = struct ~span_id:(Span_id.to_bytes span_id) ?trace_state ~attributes ?dropped_attributes_count () - let[@inline] of_span_ctx ?attrs (ctx : Span_ctx.t) : t = + let[@inline] of_span_ctx ?trace_state ?attrs ?dropped_attributes_count + (ctx : Span_ctx.t) : t = make ~trace_id:(Span_ctx.trace_id ctx) ~span_id:(Span_ctx.parent_id ctx) - ?attrs () + ?trace_state ?attrs ?dropped_attributes_count () end module Span_status : sig