ocaml-opentelemetry/opentelemetry/Opentelemetry/Globals/index.html
2026-04-06 19:57:49 +00:00

17 lines
8.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Globals (opentelemetry.Opentelemetry.Globals)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">Index</a> &#x00BB; <a href="../../index.html">opentelemetry</a> &#x00BB; <a href="../index.html">Opentelemetry</a> &#x00BB; Globals</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry.Globals</span></code></h1><p>Process-wide metadata, environment variables, etc.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-service_name"><a href="#val-service_name" class="anchor"></a><code><span><span class="keyword">val</span> service_name : <span>string <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div><div class="spec-doc"><p>Main service name metadata</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-service_namespace"><a href="#val-service_namespace" class="anchor"></a><code><span><span class="keyword">val</span> service_namespace : <span><span>string option</span> <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div><div class="spec-doc"><p>Namespace for the service</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-service_instance_id"><a href="#val-service_instance_id" class="anchor"></a><code><span><span class="keyword">val</span> service_instance_id : <span><span>string option</span> <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div><div class="spec-doc"><p>Unique identifier for the service</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-service_version"><a href="#val-service_version" class="anchor"></a><code><span><span class="keyword">val</span> service_version : <span><span>string option</span> <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div><div class="spec-doc"><p>Version for the service</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.12</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sdk_version"><a href="#val-sdk_version" class="anchor"></a><code><span><span class="keyword">val</span> sdk_version : string</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.90</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-instrumentation_library"><a href="#val-instrumentation_library" class="anchor"></a><code><span><span class="keyword">val</span> instrumentation_library :
<a href="../../Opentelemetry_proto/Common/index.html#type-instrumentation_scope">Opentelemetry_core.Common_.Proto.Common.instrumentation_scope</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-global_attributes"><a href="#val-global_attributes" class="anchor"></a><code><span><span class="keyword">val</span> global_attributes :
<span><span><a href="../../Opentelemetry_proto/Common/index.html#type-key_value">Opentelemetry_core.Common_.Proto.Common.key_value</a> list</span> <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div><div class="spec-doc"><p>Global attributes, initially set via OTEL_RESOURCE_ATTRIBUTES and modifiable by the user code. They will be attached to each outgoing metrics/traces.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_global_attribute"><a href="#val-add_global_attribute" class="anchor"></a><code><span><span class="keyword">val</span> add_global_attribute : <span>string <span class="arrow">&#45;&gt;</span></span> <span><a href="../../Opentelemetry_core/Value/index.html#type-t">Opentelemetry_core.Value.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Add a global attribute</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-merge_global_attributes_"><a href="#val-merge_global_attributes_" class="anchor"></a><code><span><span class="keyword">val</span> merge_global_attributes_ :
<span><span><a href="../../Opentelemetry_proto/Common/index.html#type-key_value">Opentelemetry_core.Common_.Proto.Common.key_value</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../Opentelemetry_proto/Common/index.html#type-key_value">Opentelemetry_core.Common_.Proto.Common.key_value</a> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-default_span_kind"><a href="#val-default_span_kind" class="anchor"></a><code><span><span class="keyword">val</span> default_span_kind : <span><a href="../../Opentelemetry_core/Span_kind/index.html#type-t">Opentelemetry_core.Span_kind.t</a> <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_runtime_attributes"><a href="#val-get_runtime_attributes" class="anchor"></a><code><span><span class="keyword">val</span> get_runtime_attributes : <span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(string * <span>[&gt; <span>`String of string</span> ]</span>)</span> list</span></span></code></div><div class="spec-doc"><p>Attributes about the OCaml runtime. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/process.md#process-runtimes</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mk_attributes"><a href="#val-mk_attributes" class="anchor"></a><code><span><span class="keyword">val</span> mk_attributes :
<span><span class="optlabel">?service_name</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?attrs</span>:
<span><span>(string
* <span>[&lt; <span>`Bool of bool</span>
<span><span>| `Float</span> of float</span>
<span><span>| `Int</span> of int</span>
<span>| `None</span>
<span><span>| `String</span> of string</span> ]</span>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../Opentelemetry_proto/Common/index.html#type-key_value">Opentelemetry_core.Common_.Proto.Common.key_value</a> list</span></span></code></div><div class="spec-doc"><p>Build main global attributes, to be used in resource attributes (shared by all spans/metrics/logs in each outgoing batch)</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-tick_cbs_"><a href="#val-tick_cbs_" class="anchor"></a><code><span><span class="keyword">val</span> tick_cbs_ : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> unit)</span> <a href="../../Opentelemetry_util/Alist/index.html#type-t">Opentelemetry_util.Alist.t</a></span></span></code></div><div class="spec-doc"><p>Global tick callback registry. Callbacks are run periodically by the SDK ticker. Other modules register here to avoid depending on <a href="../Sdk/index.html"><code>Sdk</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_on_tick_callback"><a href="#val-add_on_tick_callback" class="anchor"></a><code><span><span class="keyword">val</span> add_on_tick_callback : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_tick_callbacks"><a href="#val-run_tick_callbacks" class="anchor"></a><code><span><span class="keyword">val</span> run_tick_callbacks : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Enricher"><a href="#module-Enricher" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Enricher/index.html">Enricher</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>