Opentelemetry.Logs
Logs.
See the spec
type t = Opentelemetry_proto.Logs.log_record
type severity = Opentelemetry_proto.Logs.severity_number =
| Severity_number_unspecified
| Severity_number_trace
| Severity_number_trace2
| Severity_number_trace3
| Severity_number_trace4
| Severity_number_debug
| Severity_number_debug2
| Severity_number_debug3
| Severity_number_debug4
| Severity_number_info
| Severity_number_info2
| Severity_number_info3
| Severity_number_info4
| Severity_number_warn
| Severity_number_warn2
| Severity_number_warn3
| Severity_number_warn4
| Severity_number_error
| Severity_number_error2
| Severity_number_error3
| Severity_number_error4
| Severity_number_fatal
| Severity_number_fatal2
| Severity_number_fatal3
| Severity_number_fatal4
Severity level of a log event
val pp_severity :
Stdlib.Format.formatter ->
Opentelemetry_proto.Logs.severity_number ->
unit
type flags = Opentelemetry_proto.Logs.log_record_flags =
val pp_flags :
Stdlib.Format.formatter ->
Opentelemetry_proto.Logs.log_record_flags ->
unit
val make :
?time:Timestamp_ns.t ->
?observed_time_unix_nano:Timestamp_ns.t ->
?severity:Opentelemetry_proto.Logs.severity_number ->
?log_level:string ->
?flags:int32 ->
?trace_id:Trace_id.t ->
?span_id:Span_id.t ->
value ->
t
Make a single log entry
val make_str :
?time:Timestamp_ns.t ->
?observed_time_unix_nano:Timestamp_ns.t ->
?severity:Opentelemetry_proto.Logs.severity_number ->
?log_level:string ->
?flags:int32 ->
?trace_id:Trace_id.t ->
?span_id:Span_id.t ->
string ->
t
Make a log entry whose body is a string
val make_strf :
?time:Timestamp_ns.t ->
?observed_time_unix_nano:Timestamp_ns.t ->
?severity:Opentelemetry_proto.Logs.severity_number ->
?log_level:string ->
?flags:int32 ->
?trace_id:Trace_id.t ->
?span_id:Span_id.t ->
('a, Stdlib.Format.formatter, unit, t) format4 ->
'a
Make a log entry with format
val emit :
?service_name:string ->
?attrs:
(string
* [< `Bool of bool
| `Float of float
| `Int of int
| `None
| `String of string ])
list ->
t list ->
unit
Emit 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.