@@ -53,7 +53,7 @@ interactive shell, a `Tracer` with a blank name and version is used.
53
53
The created ` Tracer ` 's record can be looked up by the name of a module in the
54
54
OTP Application:
55
55
56
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
56
+ {{< tabpane text=true >}} {{% tab Erlang %}}
57
57
58
58
``` erlang
59
59
opentelemetry :get_application_tracer (? MODULE )
@@ -75,7 +75,7 @@ This is how the Erlang and Elixir macros for starting and updating `Spans` get a
75
75
Now that you have [ Tracer] ( /docs/concepts/signals/traces/#tracer ) s initialized,
76
76
you can create [ Spans] ( /docs/concepts/signals/traces/#spans ) .
77
77
78
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
78
+ {{< tabpane text=true >}} {{% tab Erlang %}}
79
79
80
80
``` erlang
81
81
? with_span (main , #{}, fun () ->
@@ -104,7 +104,7 @@ common kind of Span to create.
104
104
105
105
### Create Nested Spans
106
106
107
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
107
+ {{< tabpane text=true >}} {{% tab Erlang %}}
108
108
109
109
``` erlang
110
110
parent_function () ->
@@ -160,7 +160,7 @@ attaching the context and setting the new span as currently active in the
160
160
process. The whole context should be attached in order to not lose other
161
161
telemetry data like [ baggage] ( /docs/specs/otel/baggage/api/ ) .
162
162
163
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
163
+ {{< tabpane text=true >}} {{% tab Erlang %}}
164
164
165
165
``` erlang
166
166
SpanCtx = ? start_span (child ),
@@ -204,7 +204,7 @@ Span Links that causally link it to another Span. A
204
204
[ Link] ( /docs/concepts/signals/traces/#span-links ) needs a Span context to be
205
205
created.
206
206
207
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
207
+ {{< tabpane text=true >}} {{% tab Erlang %}}
208
208
209
209
``` erlang
210
210
Parent = ? current_span_ctx ,
@@ -243,7 +243,7 @@ The following example shows the two ways of setting attributes on a span by both
243
243
setting an attribute in the start options and then again with ` set_attributes `
244
244
in the body of the span operation:
245
245
246
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
246
+ {{< tabpane text=true >}} {{% tab Erlang %}}
247
247
248
248
``` erlang
249
249
? with_span (my_span , #{attributes => [{'start-opts-attr' , <<" start-opts-value" >>}]},
@@ -276,7 +276,7 @@ from the specification and provided in
276
276
For example, an instrumentation for an HTTP client or server would need to
277
277
include semantic attributes like the scheme of the URL:
278
278
279
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
279
+ {{< tabpane text=true >}} {{% tab Erlang %}}
280
280
281
281
``` erlang
282
282
-include_lib (" opentelemetry_semantic_conventions/include/trace.hrl" ).
@@ -306,7 +306,7 @@ message on an [Span](/docs/concepts/signals/traces/#spans) that represents a
306
306
discrete event with no duration that can be tracked by a single timestamp. You
307
307
can think of it like a primitive log.
308
308
309
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
309
+ {{< tabpane text=true >}} {{% tab Erlang %}}
310
310
311
311
``` erlang
312
312
? add_event (<<" Gonna try it" >>),
@@ -330,7 +330,7 @@ Tracer.add_event("Did it!")
330
330
331
331
Events can also have attributes of their own:
332
332
333
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
333
+ {{< tabpane text=true >}} {{% tab Erlang %}}
334
334
335
335
``` erlang
336
336
? add_event (<<" Process exited with reason" >>, [{pid , Pid )}, {reason , Reason }]))
@@ -354,7 +354,7 @@ could override the Error status with `StatusCode.OK`, but don’t set
354
354
355
355
The status can be set at any time before the span is finished:
356
356
357
- {{< tabpane text=true langEqualsHeader=true >}} {{% tab Erlang %}}
357
+ {{< tabpane text=true >}} {{% tab Erlang %}}
358
358
359
359
``` erlang
360
360
-include_lib (" opentelemetry_api/include/opentelemetry.hrl" ).
0 commit comments