package opentelemetry
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ca92e7395495f73b46316607c514ce0dbe5fab129dddd9a17b353f835dcbf77d
sha512=ea2afd07c8db955364681f90388959db97d7b7f5b0836bc4045eca929968d6d77905e3aa66802226c0791c2552d0e281bdf2dbfe7ed90e9877ce3cedc343823f
doc/opentelemetry.client/Opentelemetry_client/Config/index.html
Module Opentelemetry_client.ConfigSource
Constructing 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)iitems. IfNone, 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)iitems. IfNone, 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.
The default base URL for the config.
type '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
- Traces: http://localhost:4318/v1/traces
- Metrics: http://localhost:4318/v1/metrics
- Logs: http://localhost:4318/v1/logs
Use per-signal url options if different urls are needed for each signal type.
Construct, inspect, and update t configurations, drawing defaults from the environment and encapsulating state