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.12.tbz
sha256=c173d6bf9433e9eeb41bbddda116a296373d45865841dcbb78bff3be8abd9fd8
sha512=1105c52112095fdc8d4961d7346b02e416627bde6ac79ddd137bff63ac0ff5cd23fa53192be642614efadb9cb0cbb83b7d571bb5a0d100ad0ae6d10bc61d3bba

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 0.11
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.

    *)