mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
tiny refactor
This commit is contained in:
parent
901730583c
commit
25da9c4ccc
1 changed files with 3 additions and 2 deletions
|
|
@ -470,8 +470,9 @@ module Trace = struct
|
|||
let span_id = Span_id.create() in
|
||||
let scope = {trace_id;span_id;events=[]; attrs} in
|
||||
|
||||
let finally ok =
|
||||
let status = match ok with
|
||||
(* called once we're done, to emit a span *)
|
||||
let finally res =
|
||||
let status = match res with
|
||||
| Ok () -> default_status ~code:Status_code_ok ()
|
||||
| Error e -> default_status ~code:Status_code_error ~message:e () in
|
||||
let span, _ =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue