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

Add span opts in router dispatch #58

Merged
merged 2 commits into from
Oct 17, 2022
Merged

Add span opts in router dispatch #58

merged 2 commits into from
Oct 17, 2022

Conversation

davidjulien
Copy link
Contributor

Hello,

When you associate a different service name for phoenix, the phx.router_dispatch has the default service name and not the custom one.

SpandexPhoenix_CurrentBehavior

The first commit allows to fix that by adding the span opts when the span for phx.router_dispatch is started.

SpandexPhoenix_AfterFirstCommit

In case of an exception, phx.router_dispatch uses again the default service name:

SpandexPhoenix_FailRouterDispatch

The second commit allows to fix that by adding the span opts when the span is finished:

SpandexPhoenix_AfterSecondCommit

We use this fix in prod and it works well.

@sourcelevel-bot
Copy link

Hello, @davidjulien! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@GregMefford
Copy link
Member

Hey, sorry it took so long to get this merged, but thanks for taking the time to open this PR! 🎈 🚀

@GregMefford GregMefford merged commit f77ee41 into spandex-project:master Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants