rename self-tracing metrics

This commit is contained in:
Simon Cruanes 2025-12-10 11:29:20 -05:00
parent 650f4c554f
commit e3c4b6fa3a
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
3 changed files with 4 additions and 4 deletions

View file

@ -50,12 +50,12 @@ let create ~(q : OTEL.Any_signal_l.t Bounded_queue.t)
let self_metrics () : _ list = let self_metrics () : _ list =
let now = OTEL.Timestamp_ns.now_unix_ns () in let now = OTEL.Timestamp_ns.now_unix_ns () in
let m_size = let m_size =
OTEL.Metrics.gauge ~name:"otel-ocaml.exporter-queue.size" OTEL.Metrics.gauge ~name:"otel_ocaml.exporter_queue.size"
[ OTEL.Metrics.int ~now (Bounded_queue.Recv.size q.recv) ] [ OTEL.Metrics.int ~now (Bounded_queue.Recv.size q.recv) ]
in in
let m_discarded = let m_discarded =
OTEL.Metrics.sum ~is_monotonic:true OTEL.Metrics.sum ~is_monotonic:true
~name:"otel-ocaml.exporter-queue.discarded" ~name:"otel_ocaml.exporter_queue.discarded"
[ OTEL.Metrics.int ~now (Bounded_queue.Recv.num_discarded q.recv) ] [ OTEL.Metrics.int ~now (Bounded_queue.Recv.num_discarded q.recv) ]
in in
m_size :: m_discarded :: Consumer.self_metrics consumer m_size :: m_discarded :: Consumer.self_metrics consumer

View file

@ -198,7 +198,7 @@ end = struct
let open OTEL.Metrics in let open OTEL.Metrics in
let now = Mtime_clock.now () in let now = Mtime_clock.now () in
[ [
sum ~name:"otel-ocaml.export.errors" ~is_monotonic:true sum ~name:"otel_ocaml.export.errors" ~is_monotonic:true
[ int ~now:(Mtime.to_uint64_ns now) (Atomic.get n_errors) ]; [ int ~now:(Mtime.to_uint64_ns now) (Atomic.get n_errors) ];
] ]

View file

@ -115,7 +115,7 @@ end = struct
let open OTEL.Metrics in let open OTEL.Metrics in
let now = Mtime_clock.now () in let now = Mtime_clock.now () in
[ [
sum ~name:"otel-ocaml.export.discarded-by-bounded-queue" sum ~name:"otel_ocaml.export.batches_discarded_by_bounded_queue"
~is_monotonic:true ~is_monotonic:true
[ [
int ~now:(Mtime.to_uint64_ns now) int ~now:(Mtime.to_uint64_ns now)