mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-07 18:37:56 -05:00
perf: little optim in opentelemetry_trace
This commit is contained in:
parent
26bc862940
commit
dfb0befab0
1 changed files with 4 additions and 2 deletions
|
|
@ -108,8 +108,10 @@ module Internal = struct
|
|||
|
||||
let exit_span_ { span } : OTEL.Span.t =
|
||||
let open OTEL in
|
||||
if Span.is_not_dummy span then (
|
||||
let end_time = Timestamp_ns.now_unix_ns () in
|
||||
Proto.Trace.span_set_end_time_unix_nano span end_time;
|
||||
Proto.Trace.span_set_end_time_unix_nano span end_time
|
||||
);
|
||||
span
|
||||
|
||||
let exit_span' (self : state) otrace_id otel_span_begin =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue