mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 20:33:36 -04:00
doc: improve docs for main module
This commit is contained in:
parent
c01879c4b0
commit
01b31b471c
1 changed files with 22 additions and 0 deletions
|
|
@ -1,4 +1,8 @@
|
|||
|
||||
(** Opentelemetry types and instrumentation *)
|
||||
|
||||
(** {2 Wire format} *)
|
||||
|
||||
(** Protobuf types *)
|
||||
module Proto = struct
|
||||
module Common = struct
|
||||
|
|
@ -44,6 +48,8 @@ module Proto = struct
|
|||
end
|
||||
end
|
||||
|
||||
(** {2 Timestamps} *)
|
||||
|
||||
(** Unix timestamp.
|
||||
|
||||
These timestamps measure time since the Unix epoch (jan 1, 1970) UTC
|
||||
|
|
@ -61,6 +67,8 @@ module Timestamp_ns = struct
|
|||
Int64.(add d ns)
|
||||
end
|
||||
|
||||
(** {2 Interface to data collector} *)
|
||||
|
||||
(** Collector types
|
||||
|
||||
These types are used by backend implementations, to send events to
|
||||
|
|
@ -170,6 +178,8 @@ module Util_ = struct
|
|||
res
|
||||
end
|
||||
|
||||
(** {2 Identifiers} *)
|
||||
|
||||
(** Trace ID.
|
||||
|
||||
This 16 bytes identifier is shared by all spans in one trace. *)
|
||||
|
|
@ -208,6 +218,8 @@ end = struct
|
|||
let of_hex s = of_bytes (Util_.bytes_of_hex s)
|
||||
end
|
||||
|
||||
(** {2 Attributes and conventions} *)
|
||||
|
||||
module Conventions = struct
|
||||
module Attributes = struct
|
||||
module Process = struct
|
||||
|
|
@ -263,6 +275,8 @@ let _conv_key_value (k,v) =
|
|||
|
||||
(**/**)
|
||||
|
||||
(** {2 Global settings} *)
|
||||
|
||||
(** Process-wide metadata, environment variables, etc. *)
|
||||
module Globals = struct
|
||||
open Proto.Common
|
||||
|
|
@ -309,6 +323,8 @@ module Globals = struct
|
|||
l |> merge_global_attributes_
|
||||
end
|
||||
|
||||
(** {2 Traces and Spans} *)
|
||||
|
||||
(** Events.
|
||||
|
||||
Events occur at a given time and can carry attributes. They always
|
||||
|
|
@ -546,6 +562,8 @@ module Trace = struct
|
|||
raise e
|
||||
end
|
||||
|
||||
(** {2 Metrics} *)
|
||||
|
||||
(** Metrics.
|
||||
|
||||
See {{: https://opentelemetry.io/docs/reference/specification/overview/#metric-signal} the spec} *)
|
||||
|
|
@ -628,6 +646,10 @@ module Metrics = struct
|
|||
Collector.send_metrics [rm] ~ret:ignore
|
||||
end
|
||||
|
||||
module Logs = struct
|
||||
|
||||
end
|
||||
|
||||
(** {2 Utils} *)
|
||||
|
||||
(** Implementation of the W3C Trace Context spec
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue