ocaml-opentelemetry/opentelemetry/Opentelemetry/Globals/index.html
2024-09-20 16:15:07 +00:00

15 lines
5.5 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 2.4.3"/><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">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-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">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">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="../index.html#type-value">value</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">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">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_proto/Trace/index.html#type-span_span_kind">Proto.Trace.span_span_kind</a> <a href="../../../ocaml/Stdlib/index.html#type-ref">ref</a></span></span></code></div><div class="spec-doc"><p>Default span kind in <a href="../Span/index.html#val-create"><code>Span.create</code></a>. This will be used in all spans that do not specify <code>~kind</code> explicitly; it is set to &quot;internal&quot;, following directions from the <code>.proto</code> file. It can be convenient to set &quot;client&quot; or &quot;server&quot; uniformly in here.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.4</li></ul></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">Proto.Common.key_value</a> list</span></span></code></div></div></div></body></html>