Opentelemetry.LogsLogs.
See the spec
A set of callbacks that produce metrics when called. The metrics are automatically called regularly.
This allows applications to register metrics callbacks from various points in the program (or even in libraries), and not worry about setting alarms/intervals to emit them.
type severity = Severity level of a log event
val make :
?time:Timestamp_ns.t ->
?observed_time_unix_nano:Timestamp_ns.t ->
?severity:Opentelemetry__Logs_types.severity_number ->
?log_level:string ->
?flags:int32 ->
?trace_id:Trace_id.t ->
?span_id:Span_id.t ->
value ->
tMake a single log entry
val make_str :
?time:Timestamp_ns.t ->
?observed_time_unix_nano:Timestamp_ns.t ->
?severity:Opentelemetry__Logs_types.severity_number ->
?log_level:string ->
?flags:int32 ->
?trace_id:Trace_id.t ->
?span_id:Span_id.t ->
string ->
tMake a log entry whose body is a string
val make_strf :
?time:Timestamp_ns.t ->
?observed_time_unix_nano:Timestamp_ns.t ->
?severity:Opentelemetry__Logs_types.severity_number ->
?log_level:string ->
?flags:int32 ->
?trace_id:Trace_id.t ->
?span_id:Span_id.t ->
( 'a, Stdlib.Format.formatter, unit, t ) Stdlib.format4 ->
'bMake a log entry with format
val emit :
?service_name:string ->
?attrs:
(string * [< `Bool of bool | `Int of int | `None | `String of string ])
list ->
t list ->
unitEmit logs.
This instructs the collector to send the logs to some backend at a later date. NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.