-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Change tracingService methods to use contexts #19093
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
base: main
Are you sure you want to change the base?
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
6968344 to
9918597
Compare
New and NewFromString in the tracingService interface are called by trace.NewSpan and trace.NewFromString, who take and return a context. This aligns them, so the plugin matches their caller. This makes the interface more compatible with OpenTelemetry API, making it easier to write an upcoming tracing plugin using that API. Signed-off-by: Matthew McPherrin <[email protected]>
9918597 to
9f7ce81
Compare
Signed-off-by: Matthew McPherrin <[email protected]>
eea0f0d to
9de286e
Compare
|
I've looked at the CI failures and they don't seem related. Flakes? (Except pull request labels, which I don't have permission to set) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19093 +/- ##
=======================================
Coverage 69.87% 69.88%
=======================================
Files 1613 1613
Lines 216002 216020 +18
=======================================
+ Hits 150939 150968 +29
+ Misses 65063 65052 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
The tracingService interface has methods New and NewFromString that are called by trace.NewSpan and trace.NewFromString.
trace.NewSpan and trace.NewFromString take and return a context.
That matches what OpenTelemetry's API wants, but doesn't match the tracingService interface they call.
By making the tracingService methods use contexts, it'll be much easier to add OpenTelemetry for #17341 as the APIs are aligned.
Related Issue(s)
fixes #19125
blocked on #19092
blocks #17341
Checklist
Deployment Notes
This should have no functional changes, though I don't know if anyone is depending on these public interfaces outside of the Vitess codebase.
AI Disclosure
No AI written code, though some AI use while implementing this interface for OpenTelemetry is what motivated the change.