diff --git a/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/Env/index.html b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/Env/index.html new file mode 100644 index 00000000..8abca2f9 --- /dev/null +++ b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/Env/index.html @@ -0,0 +1,13 @@ + +
Config.Envval make :
+ (Opentelemetry_client.Config.t -> 'a) ->
+ 'a Opentelemetry_client.Config.makemake f is a make function that will give f a safely constructed t.
Typically this is used to extend the constructor for t with new optional arguments.
E.g., we can construct a configuration that includes a t alongside a more specific field like so:
type extended_config = {
+ new_field: string;
+ common: t;
+ }
+
+ let make : (new_field:string -> unit -> extended_config) make =
+ Env.make (fun common ~new_field () -> { new_field; common })
+
+ let _example : extended_config =
+ make ~new_field:"foo" ~url_traces:"foo/bar" ~debug:true ()As a special case, we can get the simple constructor function for t with Env.make (fun common () -> common)
Opentelemetry_client_ocurl.ConfigConfiguration for the ocurl backend
type t = private {debug : bool;url_traces : string;Url to send traces
*)url_metrics : string;Url to send metrics
*)url_logs : string;Url to send logs
*)headers : (string * string) list;API headers sent to the endpoint. Default is none or "OTEL_EXPORTER_OTLP_HEADERS" if set.
*)batch_timeout_ms : int;Number of milliseconds after which we will emit a batch, even incomplete. Note that the batch might take longer than that, because this is only checked when a new event occurs or when a tick is emitted. Default 2_000.
*)bg_threads : int;Are there background threads, and how many? Default 4. This will be adjusted to be at least 1 and at most 32.
ticker_thread : bool;If true, start a thread that regularly checks if signals should be sent to the collector. Default true
ticker_interval_ms : int;Interval for ticker thread, in milliseconds. This is only useful if ticker_thread is true. This will be clamped between 2 ms and some longer interval (maximum 60s currently). Default 500.
self_trace : bool;If true, the OTEL library will also emit its own spans. Default false.
}Configuration.
To build one, use make below. This might be extended with more fields in the future.
val make :
- ?debug:bool ->
- ?url:string ->
- ?url_traces:string ->
- ?url_metrics:string ->
- ?url_logs:string ->
- ?headers:(string * string) list ->
- ?batch_timeout_ms:int ->
- ?bg_threads:int ->
- ?ticker_thread:bool ->
- ?ticker_interval_ms:int ->
- ?self_trace:bool ->
- unit ->
- tMake a configuration.
Example of constructed per-signal urls with the base url http://localhost:4318
Use per-signal url options if different urls are needed for each signal type.
val pp : Stdlib.Format.formatter -> t -> unitOpentelemetry_client_ocurl.ConfigConfiguration for the ocurl backend
type t = {bg_threads : int;Are there background threads, and how many? Default 4. This will be adjusted to be at least 1 and at most 32.
ticker_thread : bool;If true, start a thread that regularly checks if signals should be sent to the collector. Default true
ticker_interval_ms : int;Interval for ticker thread, in milliseconds. This is only useful if ticker_thread is true. This will be clamped between 2 ms and some longer interval (maximum 60s currently). Default 500.
common : Opentelemetry_client.Config.t;Common configuration options
*)}Configuration.
To build one, use make below. This might be extended with more fields in the future.
val pp : Stdlib.Format.formatter -> t -> unitval make :
+ (?bg_threads:int ->
+ ?ticker_thread:bool ->
+ ?ticker_interval_ms:int ->
+ unit ->
+ t)
+ Opentelemetry_client.Config.makeMake a configuration t.
module Env : Opentelemetry_client.Config.ENVOpentelemetry_client.ClientUtilities for writing clients
These are used for implementing e.g., the opentelemetry-client-cohttp-lwt and opentelemetry-client-ocurl packages package.
module Config = ConfigConfig.EnvA generative functor that produces a state-space that can read configuration values from the environment, provide stateful configuration setting and accessing operations, and a way to make a new t configuration record
make f is a make function that will give f a safely constructed t.
Typically this is used to extend the constructor for t with new optional arguments.
E.g., we can construct a configuration that includes a t alongside a more specific field like so:
type extended_config = {
+ new_field: string;
+ common: t;
+ }
+
+ let make : (new_field:string -> unit -> extended_config) make =
+ Env.make (fun common ~new_field () -> { new_field; common })
+
+ let _example : extended_config =
+ make ~new_field:"foo" ~url_traces:"foo/bar" ~debug:true ()As a special case, we can get the simple constructor function for t with Env.make (fun common () -> common)
Opentelemetry_client.ConfigConstructing and managing the configuration needed in common by all clients
type t = private {debug : bool;url_traces : string;Url to send traces
*)url_metrics : string;Url to send metrics
*)url_logs : string;Url to send logs
*)headers : (string * string) list;API headers sent to the endpoint. Default is none or "OTEL_EXPORTER_OTLP_HEADERS" if set.
*)batch_traces : int option;Batch traces? If Some i, then this produces batches of (at most) i items. If None, there is no batching.
Note that traces and metrics are batched separately. Default Some 400.
batch_metrics : int option;Batch metrics? If Some i, then this produces batches of (at most) i items. If None, there is no batching.
Note that traces and metrics are batched separately. Default None.
batch_logs : int option;batch_timeout_ms : int;Number of milliseconds after which we will emit a batch, even incomplete. Note that the batch might take longer than that, because this is only checked when a new event occurs or when a tick is emitted. Default 2_000.
*)self_trace : bool;If true, the OTEL library will also emit its own spans. Default false.
}Configuration.
To build one, use make below. This might be extended with more fields in the future.
val pp : Stdlib.Format.formatter -> t -> unittype 'k make =
+ ?debug:bool ->
+ ?url:string ->
+ ?url_traces:string ->
+ ?url_metrics:string ->
+ ?url_logs:string ->
+ ?batch_traces:int option ->
+ ?batch_metrics:int option ->
+ ?batch_logs:int option ->
+ ?headers:(string * string) list ->
+ ?batch_timeout_ms:int ->
+ ?self_trace:bool ->
+ 'kA function that gathers all the values needed to construct a t, and produces a 'k. 'k is typically a continuation used to construct a configuration that includes a t.
Example of constructed per-signal urls with the base url http://localhost:4318
Use per-signal url options if different urls are needed for each signal type.
Config.ENVConstruct, inspect, and update t configurations, drawing defaults from the environment and encapsulating state
make f is a make function that will give f a safely constructed t.
Typically this is used to extend the constructor for t with new optional arguments.
E.g., we can construct a configuration that includes a t alongside a more specific field like so:
type extended_config = {
+ new_field: string;
+ common: t;
+ }
+
+ let make : (new_field:string -> unit -> extended_config) make =
+ Env.make (fun common ~new_field () -> { new_field; common })
+
+ let _example : extended_config =
+ make ~new_field:"foo" ~url_traces:"foo/bar" ~debug:true ()As a special case, we can get the simple constructor function for t with Env.make (fun common () -> common)
Opentelemetry_clientmodule Client : sig ... endUtilities for writing clients
module Config : sig ... endConstructing and managing the configuration needed in common by all clients
Opentelemetry_client__ClientThis module is hidden.
Opentelemetry_client__ConfigThis module is hidden.
Opentelemetry Opentelemetry types and instrumentationOpentelemetry_ambient_context Ambient context.Opentelemetry_ambient_context_lwt Opentelemetry_ambient_context_types Storage implementation.Opentelemetry_atomic Opentelemetry_proto Opentelemetry Opentelemetry types and instrumentationOpentelemetry_ambient_context Ambient context.Opentelemetry_ambient_context_lwt Opentelemetry_ambient_context_types Storage implementation.Opentelemetry_atomic Opentelemetry_client Opentelemetry_proto