-
Notifications
You must be signed in to change notification settings - Fork 10
WIP: Start drafting an otel opentracing plugin. #158
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: release-19.0-github
Are you sure you want to change the base?
WIP: Start drafting an otel opentracing plugin. #158
Conversation
Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an OpenTelemetry-based OpenTracing bridge plugin for Vitess tracing and updates module dependencies accordingly.
- Implements a new
newOtelTracer
factory that wires OTLP exporter, tracer provider, and OpenTracing bridge - Registers the plugin under
tracingBackendFactories["opentracing-otel"]
- Bumps and adds required OpenTelemetry and related dependencies in
go.mod
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
go/trace/plugin_otel.go | Introduces OTEL tracer provider, OTLP exporter, and OpenTracing bridge with cleanup logic |
go.mod | Upgrades existing dependencies and adds OpenTelemetry modules |
Comments suppressed due to low confidence (2)
go/trace/plugin_otel.go:42
- There are no tests covering the
newOtelTracer
initialization or its integration into the tracing registry. Consider adding unit tests to verify correct exporter setup, propagator configuration, and error paths.
func newOtelTracer(serviceName string) (tracingService, io.Closer, error) {
go/trace/plugin_otel.go:113
- [nitpick] The field name
bridgeTracer
mirrors its type and may be redundant. Consider renaming to something more concise (e.g.,tracerBridge
or simplytracer
) to improve readability.
bridgeTracer *otelBridge.BridgeTracer
// TODO: Add support for specifying other protocols via a flag | ||
client := otlptracehttp.NewClient() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a TODO without a tracking issue or implementation plan may get lost. Either implement protocol selection via flags now or reference a GitHub issue to track this work.
// TODO: Add support for specifying other protocols via a flag | |
client := otlptracehttp.NewClient() | |
// Determine the protocol to use based on the flag | |
var client otlptrace.Client | |
switch protocol { | |
case "http": | |
client = otlptracehttp.NewClient() | |
case "grpc": | |
client = otlptracegrpc.NewClient() | |
default: | |
return nil, &nilCloser{}, fmt.Errorf("unsupported protocol: %s", protocol) | |
} |
Copilot uses AI. Check for mistakes.
Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
…s-gh into arthur/add-otel-tracing-release-19
Description
See vitessio#18283 for the upstream PR.
Related Issue(s)
Checklist
Deployment Notes