From e1089152fb60ee397b2db5ecf22726dce6198212 Mon Sep 17 00:00:00 2001 From: Bernardo Amorim <828081+bamorim@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:31:09 +0100 Subject: [PATCH] Fix documentation example for OpentelemetryProcessPropagator 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)` --- .../lib/opentelemetry_process_propagator.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex b/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex index ed3b6148..f831c121 100644 --- a/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex +++ b/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex @@ -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)