Skip to content

Conversation

arthurschreiber
Copy link

@arthurschreiber arthurschreiber commented May 21, 2025

Description

See vitessio#18283 for the upstream PR.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

@Copilot Copilot AI review requested due to automatic review settings May 21, 2025 07:27
Copy link

@Copilot Copilot AI left a 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 simply tracer) to improve readability.
bridgeTracer *otelBridge.BridgeTracer

Comment on lines +57 to +58
// TODO: Add support for specifying other protocols via a flag
client := otlptracehttp.NewClient()
Copy link
Preview

Copilot AI May 21, 2025

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.

Suggested change
// 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.

Copy link

github-actions bot commented Jul 3, 2025

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label Jul 3, 2025
Copy link

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this Jul 10, 2025
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.

1 participant