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

fix(db): wrap BeginTx in spans to get acquire metrics #7689

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

muhlemmer
Copy link
Contributor

This changes adds a span around most db.BeginTx calls so we can get tracings about the connection pool acquire process.
This might help us pinpoint why sometimes some query package traces show longer execution times, while this was not reflected on database side execution times.

Definition of Ready

  • I am happy with the code
  • Short description of the feature/issue is added in the pr description
  • PR is linked to the corresponding user story
  • Acceptance criteria are met
  • All open todos and follow ups are defined in a new ticket and justified
  • Deviations from the acceptance criteria and design are agreed with the PO and documented.
  • No debug or dead code
  • My code has no repetitions
  • Critical parts are tested automatically
  • Where possible E2E tests are implemented
  • Documentation/examples are up-to-date
  • All non-functional requirements are met
  • Functionality of the acceptance criteria is checked manually on the dev system.

This changes adds a span around most db.BeginTx calls so we can get tracings about the connection pool acquire process.
This might help us pinpoint why sometimes some query package traces show longer execution times, while this was not reflected on database side execution times.
Copy link

vercel bot commented Apr 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 7:17am

@muhlemmer
Copy link
Contributor Author

Perhaps we also want to back port this to v2.49 so that we get it on cloud on the next prod deploy.

@adlerhurst
Copy link
Member

@muhlemmer as i would backplrt it i would change the semrel tag to fix

@muhlemmer muhlemmer changed the title feat(db): wrap BeginTx in spans to get acquire metrics fix(db): wrap BeginTx in spans to get acquire metrics Apr 3, 2024
@muhlemmer muhlemmer merged commit 093dd57 into main Apr 3, 2024
25 checks passed
@muhlemmer muhlemmer deleted the feat-span-begintx branch April 3, 2024 08:48
livio-a pushed a commit that referenced this pull request Apr 9, 2024
feat(db): wrap BeginTx in spans to get acquire metrics

This changes adds a span around most db.BeginTx calls so we can get tracings about the connection pool acquire process.
This might help us pinpoint why sometimes some query package traces show longer execution times, while this was not reflected on database side execution times.

Co-authored-by: Silvan <silvan.reusser@gmail.com>
(cherry picked from commit 093dd57)
Copy link

🎉 This PR is included in version 2.50.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants