You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/teleplug.ex
+63-6Lines changed: 63 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -42,21 +42,79 @@ defmodule Teleplug do
42
42
43
43
defdelegatesetup,to: Teleplug.Instrumentation
44
44
45
+
@typedoc"""
46
+
Configuration options for Teleplug
47
+
* trace_propagation_opt(default: `:as_parent`) - configure how trace propagation works.
48
+
"""
49
+
@typeopts()::[
50
+
trace_propagation: trace_propagation_opt()
51
+
]
52
+
53
+
@typedoc"
54
+
How to handle trace propagation headers:
55
+
- `:as_parent` set the propagated trace span as a parent for the request handler span.
56
+
Note that if the parent span doesn't exist your trace might be dropped by the opentelemetry collector.
57
+
If that behaviour is undesirable(eg. when using a public endpoint) you should use the `:as_link` option.
58
+
- `:as_link` create a [link](https://opentelemetry.io/docs/concepts/signals/traces/#span-links) between the propagated span and the request handler span.
0 commit comments