package opentelemetry-client
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Client SDK for https://opentelemetry.io
Install
dune-project
Dependency
Authors
Maintainers
Sources
opentelemetry-0.92.tbz
sha256=b635c486d1333cbb7276cc0075d5e01b017d4b37bd5941377ee1be07dfa25a45
sha512=2a19bf4e371ed2751e018c734ead2fd130d378ef0e018cda7b4aa3048af3e0db771fbd78d936199b34164950454bce0f3cb6211455e3647f7b7a85f4649bb22c
doc/src/opentelemetry-client.sync/util_thread.ml.html
Source file util_thread.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46(** start a thread in the background, running [f()], blocking signals *) let start_bg_thread (f : unit -> unit) : Thread.t = let unix_run () = let signals = [ Sys.sigusr1; Sys.sigusr2; Sys.sigterm; Sys.sigpipe; Sys.sigalrm; Sys.sigstop; ] in ignore (Thread.sigmask Unix.SIG_BLOCK signals : _ list); f () in (* no signals on Windows *) let run () = if Sys.win32 then f () else unix_run () in Thread.create run () (** thread that calls [tick()] regularly, to help enforce timeouts *) let setup_ticker_thread ~(active : Aswitch.t) ~sleep_ms ~(tick : unit -> unit) () = let sleep_s = float sleep_ms /. 1000. in let tick_loop () = try while Aswitch.is_on active do Thread.delay sleep_s; if Aswitch.is_on active then tick () done with | Sync_queue.Closed -> () | exn -> (* print and ignore *) let bt = Printexc.get_raw_backtrace () in Printf.eprintf "otel: background thread: uncaught exn:\n%s\n%s\n%!" (Printexc.to_string exn) (Printexc.raw_backtrace_to_string bt) in start_bg_thread tick_loop
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>