package telemetry

  1. Overview
  2. Docs
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
    | _ -> ()
);

Dependencies (2)

  1. dune >= "3.10"
  2. ocaml >= "4.12.0"

Dev Dependencies (1)

  1. odoc with-doc

Used by (3)

  1. atacama
  2. nomad
  3. riot >= "0.0.3"

Conflicts

None

OCaml

Innovation. Community. Security.