package trace

  1. Overview
  2. Docs
A stub for tracing/observability, agnostic in how data is collected

Install

Dune Dependency

Authors

Maintainers

Sources

trace-0.9.1.tbz
sha256=9739d5f46becb407e96943f4f0d6d0919e03c14299ab9c2ddbb8d46b6f7a3ea4
sha512=500230dedc834cbb8535a1624408c2f0e67683bacef5e4a55b7639c4013f6247d3aa4cbc56b61810d0138f736c1245b6b334bd3991c2e86d03faee47b729c547

doc/trace.subscriber/Trace_subscriber/Subscriber/index.html

Module Trace_subscriber.SubscriberSource

Trace subscribers

Sourcetype t =
  1. | Sub : {
    1. st : 'st;
    2. callbacks : 'st Callbacks.t;
    } -> t

A trace subscriber. It pairs a set of callbacks with the state they need (which can contain a file handle, a socket to write events to, config, etc.).

The design goal for this is that it should be possible to avoid allocations whenever the trace collector invokes the callbacks.

Sourceval dummy : t

Dummy subscriber that ignores every call.

Sourceval tee : t -> t -> t

tee s1 s2 is a subscriber that forwards every call to s1 and s2 both.

Sourceval tee_l : t list -> t

Tee multiple subscribers, ie return a subscriber that forwards to all the subscribers in subs.

OCaml

Innovation. Community. Security.