package opentelemetry
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Core library for instrumentation and serialization for https://opentelemetry.io
Install
dune-project
Dependency
Authors
Maintainers
Sources
opentelemetry-0.91.tbz
sha256=4aaee2025957acf71434a027bd57ee699a9ae927e6b49804fb1e999e16a03694
sha512=f3ec030fc4ca0483c3fc143eaa802e2aa02b4c25e1a03ec967bd017fad8a4ef6287e9f9688486434d1ac2fc403217658b61d2c7f3709c092c939b93f412ee5c5
doc/src/opentelemetry.core/trace_id.ml.html
Source file trace_id.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51type t = bytes let[@inline] to_bytes self = self let dummy : t = Bytes.make 16 '\x00' let create () : t = let b = Rand_bytes.rand_bytes_16 () in assert (Bytes.length b = 16); (* make sure the identifier is not all 0, which is a dummy identifier. *) Bytes.set b 0 (Char.unsafe_chr (Char.code (Bytes.get b 0) lor 1)); b let[@inline] of_bytes b = if Bytes.length b = 16 then b else invalid_arg "trace ID must be 16 bytes in length" (* dark magic, woo. We have an [assert] below to do the bound checks once *) external unsafe_b_get64 : bytes -> int -> int64 = "%caml_bytes_get64u" let[@inline] is_zero (self : t) : bool = (* try to reduce branches *) assert (Bytes.length self = 16); let n1 = unsafe_b_get64 self 0 in let n2 = unsafe_b_get64 self 8 in n1 = 0L && n2 = 0L let[@inline] is_valid self = not (is_zero self) let to_hex = Util_bytes_.bytes_to_hex let to_hex_into = Util_bytes_.bytes_to_hex_into let[@inline] of_hex s = of_bytes (Util_bytes_.bytes_of_hex s) let[@inline] of_hex_substring s off = of_bytes (Util_bytes_.bytes_of_hex_substring s off 32) let pp fmt t = Format.fprintf fmt "%s" (to_hex t) let compare = Bytes.compare module Map = Map.Make (struct type nonrec t = t let compare = compare end) let k_trace_id : t Hmap.key = Hmap.Key.create ()
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>