diff --git a/src/opentelemetry.ml b/src/opentelemetry.ml index 60da40b7..f4c59e5a 100644 --- a/src/opentelemetry.ml +++ b/src/opentelemetry.ml @@ -612,7 +612,7 @@ module Trace_context = struct let buf = Bytes.create len in let* str = match Bytes.blit_string str offset buf 0 len with - | () -> Ok (Bytes.to_string buf) + | () -> Ok (Bytes.unsafe_to_string buf) | exception Invalid_argument _ -> Error or_ in Ok (str, offset + len)