package opentelemetry
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4aaee2025957acf71434a027bd57ee699a9ae927e6b49804fb1e999e16a03694
sha512=f3ec030fc4ca0483c3fc143eaa802e2aa02b4c25e1a03ec967bd017fad8a4ef6287e9f9688486434d1ac2fc403217658b61d2c7f3709c092c939b93f412ee5c5
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)