mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-10 12:45:45 -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 span_id = Span_id.create() in
|
||||||
let scope = {trace_id;span_id;events=[]; attrs} in
|
let scope = {trace_id;span_id;events=[]; attrs} in
|
||||||
|
|
||||||
let finally ok =
|
(* called once we're done, to emit a span *)
|
||||||
let status = match ok with
|
let finally res =
|
||||||
|
let status = match res with
|
||||||
| Ok () -> default_status ~code:Status_code_ok ()
|
| Ok () -> default_status ~code:Status_code_ok ()
|
||||||
| Error e -> default_status ~code:Status_code_error ~message:e () in
|
| Error e -> default_status ~code:Status_code_error ~message:e () in
|
||||||
let span, _ =
|
let span, _ =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue