Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tesla: Include span attributes on error #260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeffutter
Copy link
Contributor

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.

Copy link

linux-foundation-easycla bot commented Jan 24, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jeffutter / name: Jeffery Utter (1b48e18)

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`.
@jeffutter jeffutter force-pushed the tesla-include-attributes-on-error branch from 01c2146 to 1b48e18 Compare February 11, 2024 20:02
} = env
) do
attrs =
Map.merge(build_base_attrs(env), %{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning to replace all the attributes created during the request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants