mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
add runtime attrs to GC stats
This commit is contained in:
parent
66693280ec
commit
1919154085
1 changed files with 3 additions and 1 deletions
|
|
@ -47,7 +47,9 @@ let gc_metrics = AList.make() (* side channel for GC, appended to {!E_metrics}'s
|
||||||
collection *)
|
collection *)
|
||||||
let sample_gc_metrics () =
|
let sample_gc_metrics () =
|
||||||
Atomic.set needs_gc_metrics false;
|
Atomic.set needs_gc_metrics false;
|
||||||
let l = OT.Metrics.make_resource_metrics @@ Opentelemetry.GC_metrics.get_metrics() in
|
let l = OT.Metrics.make_resource_metrics
|
||||||
|
~attrs:(Opentelemetry.GC_metrics.get_runtime_attributes ())
|
||||||
|
@@ Opentelemetry.GC_metrics.get_metrics() in
|
||||||
AList.add gc_metrics l
|
AList.add gc_metrics l
|
||||||
|
|
||||||
let lock_ : (unit -> unit) ref = ref ignore
|
let lock_ : (unit -> unit) ref = ref ignore
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue