Skip to content

Commit

Permalink
Fix documentation example for OpentelemetryProcessPropagator
Browse files Browse the repository at this point in the history
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)`
  • Loading branch information
bamorim authored Oct 24, 2023
1 parent 652d06b commit e108915
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e108915

Please sign in to comment.