package trace

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

trace-0.11.tbz
sha256=a29329fcfb191a98bfed26c05c300ed9e1e915b73cc59f51e9d9cdc4d1f158bc
sha512=ff77a4ef19375f4ad3b1ddff7336657a4a5695924b679ac2c36a77b14b95c63d126539efd1590f83b415a1288bb843a5fb4308e53a807dcc22456cb40a8e0026

doc/trace.core/Trace_core/Collector/index.html

Module Trace_core.CollectorSource

A global collector.

The collector, if present, is responsible for collecting messages and spans, and storing them, recording them, forward them, or offering them to other services and processes.

Sourcetype Trace_core__.Types.span +=
  1. | Span_dummy
Sourceval dummy_span : Trace_core__.Types.span

A fake span that never emits data. All collectors should handle this span by doing nothing.

Sourcemodule Callbacks : sig ... end
Sourcetype t =
  1. | C_none
    (*

    No collector.

    *)
  2. | C_some : 'st * 'st Callbacks.t -> t
    (*

    Collector with a state and some callbacks.

    *)

Definition of a collector.

This is only relevant to implementors of tracing backends; to instrument your code you only need to look at the Trace module.

The definition changed since NEXT_RELEASE to a record of callbacks + a state

Sourceval is_some : t -> bool