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

Move span creation to middleware #34

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

Conversation

msosnicki
Copy link

Proposal to change the behavior of NatchezMiddleware.server.

Currently, it puts the context into existing span. The span per request is created in the EntryPointOps, which is only used for Kleisli based implementation. It means that server middleware is not working correctly with IOLocal based tracing.

The proposal is to move the span creation (+ continuation) into middleware itself, and inject RootsSpan for Kleisli based routes.

If it's accepted, I can drop in few tests that verify that both IOLocal and Kleisli Trace implementations yield the same results.

@alexcardell
Copy link

👍 for this, we've been having to write little wrapper middlewares to do the parent span options

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.

None yet

2 participants