mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
Use domain ID instead of thread ID in Eio collector
Eio programs are not generally expected to use threads for concurrency, but they may well use different domains which we'd want to track during debugging.
This commit is contained in:
parent
c30f3b1c0c
commit
474d43bdad
1 changed files with 1 additions and 3 deletions
|
|
@ -15,8 +15,6 @@ let ( let@ ) = ( @@ )
|
||||||
|
|
||||||
let spf = Printf.sprintf
|
let spf = Printf.sprintf
|
||||||
|
|
||||||
let tid () = Thread.id @@ Thread.self ()
|
|
||||||
|
|
||||||
let set_headers = Config.Env.set_headers
|
let set_headers = Config.Env.set_headers
|
||||||
|
|
||||||
let get_headers = Config.Env.get_headers
|
let get_headers = Config.Env.get_headers
|
||||||
|
|
@ -330,7 +328,7 @@ let mk_emitter ~stop ~net (config : Config.t) : (module EMITTER) =
|
||||||
|
|
||||||
let tick () =
|
let tick () =
|
||||||
if Config.Env.get_debug () then
|
if Config.Env.get_debug () then
|
||||||
Printf.eprintf "tick (from %d)\n%!" (tid ());
|
Printf.eprintf "tick (from domain %d)\n%!" (Domain.self () :> int);
|
||||||
run_tick_callbacks ();
|
run_tick_callbacks ();
|
||||||
sample_gc_metrics_if_needed ();
|
sample_gc_metrics_if_needed ();
|
||||||
emit_all ~force:false
|
emit_all ~force:false
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue