-
Notifications
You must be signed in to change notification settings - Fork 12
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
Is a context manager really necessary? #31
Comments
Hi @carlpett, thanks for opening an issue! I can confirm that a context manager is still required in order for If using the Good catch with the missing |
Ah, I am indeed using the |
I've gone ahead and updated our examples, thanks for bringing this to our attention @carlpett! 😎 👍 |
In the readme, there's a comment in the example claiming that wrap routes requires having a context manager:
fastify-opentelemetry/README.md
Lines 72 to 76 in 15f12eb
Now, it seems there's a bug here, you need to call
enable()
on the context manager. Otherwise the parent span got lost afterawait
:ing in handlers. But after finding that out, I saw references in upstream release notes that another context manager is automatically used if not manually installed. And simply removingAsyncHooksContextManager
altogether seems to also get things working...Is the comment outdated, or is there something I'm not seeing yet?
The text was updated successfully, but these errors were encountered: