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

WIP: Propagate trace context from Cowboy to Plug #5

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

Conversation

GregMefford
Copy link
Member

This is still WIP, but I got the basics working for using @binaryseed's cowboy_telemetry that was recently added to PlugCowboy. I'm hopeful that this will allow us to much more reliably capture traces for all requests, even if something crashes or exits in the Plug request process.

I shoved it in this branch so that I could quickly try to get it working without having to juggle all the Spandex deps, but I think ultimately this belongs in a re-usable library instead of copy/pasted into everyone's apps.

@zachdaniel
Copy link
Member

This looks very cool :)

@zachdaniel
Copy link
Member

Its interesting, I thought someone ended up implementing some code in spandex_ecto that looked up the trace context from the caller_pid, but I can't find it. But in that case, it should mean that some spans for ecto's parallel preload would just be lost, right? I was thinking the telemetry handler managed ets table could be good solution for the ecto issue as well, but maybe thats a non-issue now 🤷‍♂️ .

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