mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-07 18:37:56 -05:00
rename self-tracing metrics
This commit is contained in:
parent
650f4c554f
commit
e3c4b6fa3a
3 changed files with 4 additions and 4 deletions
|
|
@ -50,12 +50,12 @@ let create ~(q : OTEL.Any_signal_l.t Bounded_queue.t)
|
|||
let self_metrics () : _ list =
|
||||
let now = OTEL.Timestamp_ns.now_unix_ns () in
|
||||
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) ]
|
||||
in
|
||||
let m_discarded =
|
||||
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) ]
|
||||
in
|
||||
m_size :: m_discarded :: Consumer.self_metrics consumer
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ end = struct
|
|||
let open OTEL.Metrics 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) ];
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ end = struct
|
|||
let open OTEL.Metrics 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
|
||||
[
|
||||
int ~now:(Mtime.to_uint64_ns now)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue