View Source Tesla.Middleware.OpenTelemetry (opentelemetry_tesla v2.4.0)
Creates OpenTelemetry spans and injects tracing headers into HTTP requests
When used with Tesla.Middleware.PathParams, the span name will be created
based on the provided path. Without it, the span name follow OpenTelemetry
standards and use just the method name, if not being overridden by opts.
NOTE: This middleware needs to come before Tesla.Middleware.PathParams
Options
:span_name- override span name. Can be aStringfor a static span name, or a function that takes theTesla.Envand returns aString:propagator- configures trace headers propagators. Setting it to:nonedisables propagation. Any module that implements:otel_propagator_text_mapcan be used. Defaults to calling:otel_propagator_text_map.get_text_map_injector/0:mark_status_ok- configures spans with a list of expected HTTP error codes to be marked asok, not as an error-containing spans
Summary
Functions
Callback implementation for Tesla.Middleware.call/3.
Functions
Callback implementation for Tesla.Middleware.call/3.