package telemetry
A lightweight library for dispatching and handling events, with a focus on metrics and instrumentation
Install
Dune Dependency
Authors
Maintainers
Sources
telemetry-0.0.1.tbz
sha256=6047fbcc2fc5db3241b5035fc89d8ece72a6a05a3532cf4ed96822385921a76f
sha512=6cef9fdb2f7160051d77ca1a2d89c123f8f107b0c3f5e9b66feaefe630a7efe7be65e8e25f18906182ee922a1f8b1582c37ba432492a41450a70289ace2e7988
Description
Telemetry is a lightweight library for dynamic dispatching of events, with a focus on metrics and instrumentation. Any OCaml library can use telemetry to emit events, then application code and other libraries can then hook into those events and run custom handlers.
README
telemetry
Telemetry is a lightweight library for dynamic dispatching of events, with a focus on metrics and instrumentation. Any OCaml library can use telemetry to emit events, then application code and other libraries can then hook into those events and run custom handlers.
Getting Started
Install from Opam:
opam install telemetry
Create some events in your library or application code:
type Telemetry.event += Web_request_done of { latency: int }
Telemetry.emit (Web_request_done { latency = 10 });
And now attach listeners:
Telemetry.attach (fun ev ->
match ev with
| Web_request_done {latency} ->
Printf.printf "Web request took %sms" latency
| _ -> ()
);
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page