Fix documentation example for OpentelemetryProcessPropagator (#220)
The example calling `OpentelemetryProcessPropagator.fetch_parent_ctx` was passing the key to the `/1` arity function, which is not the argument it expects. To specify the key you also need to specify the depth first, using the `/2` arity function: `OpentelemetryProcessPropagator.fetch_parent_ctx(depth, key)`
This commit is contained in:
parent
652d06bfce
commit
e62612fca1
|
@ -50,7 +50,7 @@ defmodule OpentelemetryProcessPropagator do
|
|||
# you don't control, e.g. Ecto preloads
|
||||
|
||||
Task.async(fn ->
|
||||
parent_ctx = OpentelemetryProcessPropagator.fetch_parent_ctx(:"$callers")
|
||||
parent_ctx = OpentelemetryProcessPropagator.fetch_parent_ctx(1, :"$callers")
|
||||
|
||||
OpenTelemetry.Ctx.attach(parent_ctx)
|
||||
|
||||
|
|
Loading…
Reference in New Issue