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.simple/Trace_simple/Simple_span/index.html

Module Trace_simple.Simple_spanSource

A simple span.

This is a concrete representation of spans that is convenient to manipulate.

  • since NEXT_RELEASE
Sourcetype span_flavor = [
  1. | `Sync
  2. | `Async
]
Sourcetype t = {
  1. name : string;
  2. __FUNCTION__ : string option;
  3. __FILE__ : string;
  4. __LINE__ : int;
  5. time_ns : int64;
    (*

    Time the span was entered.

    *)
  6. mutable time_exit_ns : int64;
    (*

    Time the span was exited. Set at exit, Int64.max_int otherwise

    *)
  7. tid : int;
    (*

    Thread in which span was created

    *)
  8. trace_id : int64;
    (*

    For async spans

    *)
  9. parent : Trace_core.parent;
  10. flavor : span_flavor;
  11. params : Trace_core.extension_parameter list;
  12. mutable data : (string * Trace_core.user_data) list;
    (*

    Modified by add_data_to_span

    *)
}

The type of spans used by all subscribers.

Sourcetype Trace_core.span +=
  1. | Span_simple of t
    (*

    How to turn a Simple_span.t into a span.

    *)