mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
12 lines
No EOL
4.5 KiB
HTML
12 lines
No EOL
4.5 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Trace (opentelemetry.Opentelemetry.Trace)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.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">opentelemetry</a> » <a href="../index.html">Opentelemetry</a> » Trace</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry.Trace</span></code></h1><p>Traces.</p><p>See <a href="https://opentelemetry.io/docs/reference/specification/overview/#tracing-signal">the spec</a></p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-span" class="anchored"><a href="#type-span" class="anchor"></a><code><span><span class="keyword">type</span> span</span><span> = <a href="../Span/index.html#type-t">Span.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-emit" class="anchored"><a href="#val-emit" class="anchor"></a><code><span><span class="keyword">val</span> emit : <span><span><a href="#type-span">span</a> list</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>Sync emitter</p></div></div><div class="odoc-spec"><div class="spec type" id="type-scope" class="anchored"><a href="#type-scope" class="anchor"></a><code><span><span class="keyword">type</span> scope</span><span> = </span><span>{</span></code><table><tr id="type-scope.trace_id" class="anchored"><td class="def record field"><a href="#type-scope.trace_id" class="anchor"></a><code><span>trace_id : <a href="../Trace_id/index.html#type-t">Trace_id.t</a>;</span></code></td></tr><tr id="type-scope.span_id" class="anchored"><td class="def record field"><a href="#type-scope.span_id" class="anchor"></a><code><span>span_id : <a href="../Span_id/index.html#type-t">Span_id.t</a>;</span></code></td></tr><tr id="type-scope.events" class="anchored"><td class="def record field"><a href="#type-scope.events" class="anchor"></a><code><span><span class="keyword">mutable</span> events : <span><a href="../Event/index.html#type-t">Event.t</a> list</span>;</span></code></td></tr></table><code><span>}</span></code></div><div class="spec-doc"><p>Scope to be used with <a href="#val-with_"><code>with_</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-add_event" class="anchored"><a href="#val-add_event" class="anchor"></a><code><span><span class="keyword">val</span> add_event : <span><a href="#type-scope">scope</a> <span class="arrow">-></span></span> <span><span>( <span>unit <span class="arrow">-></span></span> <a href="../Event/index.html#type-t">Event.t</a> )</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>Add an event to the scope. It will be aggregated into the span.</p><p>Note that this takes a function that produces an event, and will only call it if there is an instrumentation backend.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-with_" class="anchored"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ :
|
||
<span>?trace_state:string <span class="arrow">-></span></span>
|
||
<span>?service_name:string <span class="arrow">-></span></span>
|
||
<span>?attrs:<span><a href="../Span/index.html#type-key_value">Span.key_value</a> list</span> <span class="arrow">-></span></span>
|
||
<span>?kind:<a href="../Span/index.html#type-kind">Span.kind</a> <span class="arrow">-></span></span>
|
||
<span>?trace_id:<a href="../Trace_id/index.html#type-t">Trace_id.t</a> <span class="arrow">-></span></span>
|
||
<span>?parent:<a href="../Span/index.html#type-id">Span.id</a> <span class="arrow">-></span></span>
|
||
<span>?links:<span><span>(<a href="../Trace_id/index.html#type-t">Trace_id.t</a> * <a href="../Span_id/index.html#type-t">Span_id.t</a> * string)</span> list</span> <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span><span>( <span><a href="#type-scope">scope</a> <span class="arrow">-></span></span> <span class="type-var">'a</span> )</span> <span class="arrow">-></span></span>
|
||
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Sync span guard</p></div></div></div></body></html> |