mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
add optional args to Span_link.of_span_ctx
This commit is contained in:
parent
3f41c7e450
commit
1848b02c0f
1 changed files with 9 additions and 3 deletions
|
|
@ -782,7 +782,12 @@ module Span_link : sig
|
||||||
unit ->
|
unit ->
|
||||||
t
|
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
|
end = struct
|
||||||
open Proto.Trace
|
open Proto.Trace
|
||||||
|
|
||||||
|
|
@ -799,9 +804,10 @@ end = struct
|
||||||
~span_id:(Span_id.to_bytes span_id) ?trace_state ~attributes
|
~span_id:(Span_id.to_bytes span_id) ?trace_state ~attributes
|
||||||
?dropped_attributes_count ()
|
?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)
|
make ~trace_id:(Span_ctx.trace_id ctx) ~span_id:(Span_ctx.parent_id ctx)
|
||||||
?attrs ()
|
?trace_state ?attrs ?dropped_attributes_count ()
|
||||||
end
|
end
|
||||||
|
|
||||||
module Span_status : sig
|
module Span_status : sig
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue