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

Enable tracing #4195

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

Conversation

daniel-pedersen
Copy link

This PR enables otel tracing, which is already implemented.

The tracing seems to have been disabled due to incompatibility with top-level await for certain bundlers. This issue was resolved with an IIFE.

Additionaly, a bug was fixed where the finally clause runs before the promise resolves due to the wrapper retuning early. Hence the async/await wrapping on the span.

We've run this code as a patch in production for a few weeks and it works well. Though only tested for postgres-js.

Let me know if any tests are needed, or how I can help to get this feature enabled.

Copy link

@extradosages extradosages left a comment

Choose a reason for hiding this comment

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

Perhaps this deserves some documentation, and a peer dependency in the package.json.

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