mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
fix: make sure we clear out the encoder when reusing it
This commit is contained in:
parent
62085e87cb
commit
f8d4ac7c3c
1 changed files with 3 additions and 1 deletions
|
|
@ -9,7 +9,9 @@ module Converter = struct
|
|||
let resource_to_string ~encoder ~ctor ~enc resource =
|
||||
let encoder =
|
||||
match encoder with
|
||||
| Some e -> e
|
||||
| Some e ->
|
||||
Pbrt.Encoder.reset e;
|
||||
e
|
||||
| None -> Pbrt.Encoder.create ()
|
||||
in
|
||||
let x = ctor resource in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue