Packages
Tesla middleware that creates OpenTelemetry spans and injects tracing headers into HTTP requests for Tesla clients.
Current section
Files
Jump to
Current section
Files
lib/middleware/opentelemetry_tesla_middleware.ex
defmodule Tesla.Middleware.OpenTelemetry do
@behaviour Tesla.Middleware
def call(env, next, _options) do
env
|> Tesla.put_headers(:otel_propagator.text_map_inject([]))
|> Tesla.run(next)
end
end