package opentelemetry

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Opentelemetry.SdkSource

include module type of struct include Sdk end
Sourceval remove : on_done:(unit -> unit) -> unit -> unit

Remove current exporter, if any.

  • parameter on_done

    called once the exporter has fully shut down (queue drained).

Sourceval present : unit -> bool
Sourceval get : unit -> Opentelemetry_core.Exporter.t option

Aswitch of the installed exporter, or Aswitch.dummy if none.

Sourceval add_on_tick_callback : (unit -> unit) -> unit
Sourceval run_tick_callbacks : unit -> unit
Sourceval tick : unit -> unit

Tick all providers and run all registered callbacks. Call this periodically (e.g. every 500ms) to drive metrics collection, GC metrics, and batch timeout flushing. This is the single function client libraries should call from their ticker.

Sourceval set : ?traces:??? -> ?metrics:??? -> ?logs:??? -> ?sampler:??? -> Opentelemetry_core.Exporter.t -> unit

Install exp as the global exporter.

  • parameter sampler

    global Trace_sampler, None (default) samples everything. Client setups pass Trace_sampler.of_env, which defaults to parent_based always_on. Since 0.92

Sourceval self_metrics : unit -> Opentelemetry_core.Metrics.t list
Sourceval setup_self_metrics : unit -> unit

Regularly emit metrics about the OTEL SDK. Idempotent.

Sourceval get_tracer : ?name:??? -> ?version:??? -> ?attrs:??? -> ?__MODULE__:??? -> unit -> Tracer.t

Get a tracer forwarding to the current main exporter.

  • since 0.90
Sourceval get_meter : ?name:??? -> ?version:??? -> ?attrs:??? -> ?__MODULE__:??? -> unit -> Meter.t

Get a meter forwarding to the current main exporter.

  • since 0.90
Sourceval get_logger : ?name:??? -> ?version:??? -> ?attrs:??? -> ?__MODULE__:??? -> unit -> Logger.t

Get a logger forwarding to the current main exporter.

  • since 0.90
Sourceval self_debug_to_stderr : ?min_level:??? -> unit -> unit