mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-12 05:26:17 -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 *)
|
(** Protobuf types *)
|
||||||
module Proto = struct
|
module Proto = struct
|
||||||
module Common = struct
|
module Common = struct
|
||||||
|
|
@ -44,6 +48,8 @@ module Proto = struct
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(** {2 Timestamps} *)
|
||||||
|
|
||||||
(** Unix timestamp.
|
(** Unix timestamp.
|
||||||
|
|
||||||
These timestamps measure time since the Unix epoch (jan 1, 1970) UTC
|
These timestamps measure time since the Unix epoch (jan 1, 1970) UTC
|
||||||
|
|
@ -61,6 +67,8 @@ module Timestamp_ns = struct
|
||||||
Int64.(add d ns)
|
Int64.(add d ns)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(** {2 Interface to data collector} *)
|
||||||
|
|
||||||
(** Collector types
|
(** Collector types
|
||||||
|
|
||||||
These types are used by backend implementations, to send events to
|
These types are used by backend implementations, to send events to
|
||||||
|
|
@ -170,6 +178,8 @@ module Util_ = struct
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(** {2 Identifiers} *)
|
||||||
|
|
||||||
(** Trace ID.
|
(** Trace ID.
|
||||||
|
|
||||||
This 16 bytes identifier is shared by all spans in one trace. *)
|
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)
|
let of_hex s = of_bytes (Util_.bytes_of_hex s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(** {2 Attributes and conventions} *)
|
||||||
|
|
||||||
module Conventions = struct
|
module Conventions = struct
|
||||||
module Attributes = struct
|
module Attributes = struct
|
||||||
module Process = struct
|
module Process = struct
|
||||||
|
|
@ -263,6 +275,8 @@ let _conv_key_value (k,v) =
|
||||||
|
|
||||||
(**/**)
|
(**/**)
|
||||||
|
|
||||||
|
(** {2 Global settings} *)
|
||||||
|
|
||||||
(** Process-wide metadata, environment variables, etc. *)
|
(** Process-wide metadata, environment variables, etc. *)
|
||||||
module Globals = struct
|
module Globals = struct
|
||||||
open Proto.Common
|
open Proto.Common
|
||||||
|
|
@ -309,6 +323,8 @@ module Globals = struct
|
||||||
l |> merge_global_attributes_
|
l |> merge_global_attributes_
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(** {2 Traces and Spans} *)
|
||||||
|
|
||||||
(** Events.
|
(** Events.
|
||||||
|
|
||||||
Events occur at a given time and can carry attributes. They always
|
Events occur at a given time and can carry attributes. They always
|
||||||
|
|
@ -546,6 +562,8 @@ module Trace = struct
|
||||||
raise e
|
raise e
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(** {2 Metrics} *)
|
||||||
|
|
||||||
(** Metrics.
|
(** Metrics.
|
||||||
|
|
||||||
See {{: https://opentelemetry.io/docs/reference/specification/overview/#metric-signal} the spec} *)
|
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
|
Collector.send_metrics [rm] ~ret:ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module Logs = struct
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
(** {2 Utils} *)
|
(** {2 Utils} *)
|
||||||
|
|
||||||
(** Implementation of the W3C Trace Context spec
|
(** Implementation of the W3C Trace Context spec
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue