This commit is contained in:
Simon Cruanes 2022-03-24 14:02:45 -04:00
parent c419a61815
commit 15511a7517
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -582,16 +582,16 @@ module Metrics = struct
end end
(** Implementation of the W3C Trace Context spec
https://www.w3.org/TR/trace-context/
*)
module Trace_context = struct module Trace_context = struct
(** Implementation of the W3C Trace Context spec
https://www.w3.org/TR/trace-context/
*)
(** The traceparent header
https://www.w3.org/TR/trace-context/#traceparent-header
*)
module Traceparent = struct module Traceparent = struct
(** The traceparent header
https://www.w3.org/TR/trace-context/#traceparent-header
*)
let name = "traceparent" let name = "traceparent"
@ -599,14 +599,14 @@ module Trace_context = struct
The values are of the form: The values are of the form:
{version}-{trace_id}-{parent_id}-{flags} {version}-{trace_id}-{parent_id}-{flags}
For example: For example:
00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
{flags} are currently ignored. {flags} are currently ignored.
*) *)
let of_value str : (Trace_id.t * Span_id.t, string) result = let of_value str : (Trace_id.t * Span_id.t, string) result =
let ( let* ) = Result.bind in let ( let* ) = Result.bind in
let blit ~offset ~len ~or_ = let blit ~offset ~len ~or_ =