Module Trace_runtime_eventsSource

Simple collector that emits trace events via Runtime_events.

Event types for decoding

Sourcemodule String_type : sig ... end
Sourcemodule String_int : sig ... end
Sourcemodule String_float : sig ... end
Sourcemodule Events : sig ... end

Custom events

Collector

Sourceval collector : ?start_events:bool -> unit -> Trace_core.Collector.t

collector ~start_events () creates a new collector that emits events via Runtime_events.

  • parameter start_events

    if true (default), automatically call Runtime_events.start() when the collector is initialized.

Sourceval setup : ?start_events:bool -> unit -> unit

setup ~start_events () sets up the Runtime_events collector as the global collector.

See collector

Sourceval with_setup : ?start_events:bool -> (unit -> 'a) -> 'a

with_setup ~start_events f runs f () with the Runtime_events collector enabled, and shuts it down when done.

See collector