package opentelemetry
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=30f344e7168a793d02c12d69c0f566b06eb963f52db3321e415ef6c5cd3d504d
sha512=19160da37cab59a23333d815baa67035f666e700a386953ec9957c685a0b72fa87919bac6a6651e50b1619773b3be7170bcc067c2d5316436b988bcf8d18dcba
doc/opentelemetry.emitter/Opentelemetry_emitter/Emitter/index.html
Module Opentelemetry_emitter.EmitterSource
Emitters.
This is the composable abstraction we use to represent how signals are emitted, from their origin point (a site in user code or library code that was instrumented, and just created a span or log record or metric), down to the actual SDK exporter installed in the application.
type -'a t = {signal_name : string;(*Description of what signal is emitted
*)enabled : unit -> bool;(*Return
*)trueifemithas a chance of doing something with the signals it's given.emit : 'a list -> unit;(*Emit signals.
*)tick : mtime:Mtime.t -> unit;(*Call regularly to ensure background work is done. The current monotonic timestamp is passed to improve testability.
*)closed : unit -> bool;(*True if the emitter is already closed. Beware TOCTOU bugs.
*)flush_and_close : unit -> unit;(*Flush internally buffered signals, then close.
*)self_metrics : now:Opentelemetry_util.Timestamp_ns.t -> unit -> Opentelemetry_proto.Metrics.metric list;(*metrics about the emitter itself.
*)
}An emitter for values of type 'a.
val self_metrics :
'a t ->
now:Opentelemetry_util.Timestamp_ns.t ->
Opentelemetry_proto.Metrics.metric listmap f emitter returns a new emitter that applies f to signals item-wise before passing them to emitter
map_l f emitter applies f to incoming lists of signals, and emits the resulting list (if non empty)