opentelemetry-erlang-contrib
opentelemetry-erlang-contrib copied to clipboard
Tesla: Include span attributes on error
The call to Tesla.run could possibly return {:error, _} in certain cases (ex. timeout). Since attributes were set in a step after this, they were skipped in these scenarios.
This sets the attributes before the call to Tesla.run and then again after to cover the scenario that a middleware modified the attributes and they have been updated on the Env.