ocaml-opentelemetry/dev/opentelemetry/Opentelemetry/Trace/index.html
2022-03-23 12:53:43 +00:00

24 lines
No EOL
5.6 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>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> &#x00BB; <a href="../index.html">Opentelemetry</a> &#x00BB; 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-make_resource_spans" class="anchored"><a href="#val-make_resource_spans" class="anchor"></a><code><span><span class="keyword">val</span> make_resource_spans :
<span>?service_name:string <span class="arrow">&#45;&gt;</span></span>
<span>?attrs:
<span><span>(string * <span>[&lt; <span>`Bool of bool</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><span><a href="../Proto/Trace/index.html#type-span">Proto.Trace.span</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../Proto/Trace/index.html#type-resource_spans">Proto.Trace.resource_spans</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>?service_name:string <span class="arrow">&#45;&gt;</span></span>
<span>?attrs:
<span><span>(string * <span>[&lt; <span>`Bool of bool</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><span><a href="#type-span">span</a> list</span> <span class="arrow">&#45;&gt;</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">&#45;&gt;</span></span> <span><span>( <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="../Event/index.html#type-t">Event.t</a> )</span> <span class="arrow">&#45;&gt;</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">&#45;&gt;</span></span>
<span>?service_name:string <span class="arrow">&#45;&gt;</span></span>
<span>?attrs:<span><a href="../Span/index.html#type-key_value">Span.key_value</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?kind:<a href="../Span/index.html#type-kind">Span.kind</a> <span class="arrow">&#45;&gt;</span></span>
<span>?trace_id:<a href="../Trace_id/index.html#type-t">Trace_id.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>?parent:<a href="../Span/index.html#type-id">Span.id</a> <span class="arrow">&#45;&gt;</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">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span>( <span><a href="#type-scope">scope</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</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>