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:
Bernardo Amorim 2023-10-25 02:32:44 +01:00 committed by GitHub
parent 652d06bfce
commit e62612fca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)