Skip to content

feat: flip OpenTracing bridge default to false, use OTEL for HTTP middleware#51

Merged
ankurs merged 3 commits intomainfrom
feat/otel-migration
Mar 28, 2026
Merged

feat: flip OpenTracing bridge default to false, use OTEL for HTTP middleware#51
ankurs merged 3 commits intomainfrom
feat/otel-migration

Conversation

@ankurs
Copy link
Copy Markdown
Member

@ankurs ankurs commented Mar 28, 2026

Summary

  • Flip OTLPUseOpenTracingBridge default from true to false (deprecated, kept for backward compat)
  • Replace OpenTracing HTTP middleware (tracingWrapper) with native OTEL: otel.Tracer().Start() + otel.GetTextMapPropagator()
  • Remove grpc_opentracing options from gRPC gateway client setup
  • Keep bridge code in SetupOpenTelemetry for services that still need it (OTLP_USE_OPENTRACING_BRIDGE=true)

Replace directives

Contains temporary replace directives for local tracing/interceptors/errors packages. Remove before merging — wait for upstream PRs to land first.

Depends on

Migration for users

Services relying on the implicit OpenTracing bridge should set OTLP_USE_OPENTRACING_BRIDGE=true explicitly.

Test plan

  • go test -race ./... — passes (with local replace)
  • make lint — 0 issues

…dleware

- Flip OTLPUseOpenTracingBridge default from true to false (deprecated)
- Replace OpenTracing HTTP middleware with native OTEL tracer + propagator
- Remove grpc_opentracing options from gRPC gateway client setup
- Keep bridge code in initializers.go for backward compatibility
- Replace directives for local tracing/interceptors/errors (remove before merge)
Copilot AI review requested due to automatic review settings March 28, 2026 01:24
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

Warning

Rate limit exceeded

@ankurs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 7 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 7 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1e2ecd1b-b3a4-4ecc-9677-c405e6ac6ca2

📥 Commits

Reviewing files that changed from the base of the PR and between 2fbab67 and e3ee126.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • README.md
  • config/config.go
  • core.go
  • go.mod
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/otel-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

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

Updates tracing defaults and middleware to prefer native OpenTelemetry over OpenTracing, while keeping an opt-in OpenTracing bridge for backward compatibility.

Changes:

  • Flips OTLPUseOpenTracingBridge default to false and marks it deprecated for backward compatibility.
  • Replaces the HTTP tracing middleware implementation from OpenTracing to OTEL (otel.Tracer().Start + global propagator extraction).
  • Removes OpenTracing-related gRPC gateway client options and drops the go-grpc-middleware v1 dependency.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
go.mod Removes gRPC opentracing middleware dependency, adds direct OTEL trace dep, and introduces local replace directives (temporary).
go.sum Cleans up sums consistent with dependency changes.
core.go Replaces OpenTracing HTTP middleware with OTEL spans + propagator extraction; removes gRPC opentracing options for gateway dial.
config/config.go Changes OTLPUseOpenTracingBridge default to false and documents deprecation/back-compat intent.
README.md Updates generated link target line number for New.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
Comment thread core.go Outdated
Comment thread core.go
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
Comment on lines +299 to +303
replace github.com/go-coldbrew/tracing => ../tracing

replace github.com/go-coldbrew/interceptors => ../interceptors

replace github.com/go-coldbrew/errors => ../errors
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

The local replace directives are intended to be temporary; when they’re removed, this go.mod will fall back to the currently pinned versions (github.com/go-coldbrew/{tracing,interceptors,errors}), which likely won’t include the OTEL migration changes this PR depends on. Before dropping the replace lines, update the require versions to the tagged releases that include the upstream PRs and re-run go mod tidy so builds don’t silently regress to older behavior or fail to compile.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correct — already noted in the PR description. When dropping the replace directives, the require versions will be bumped to the tagged releases containing the OTEL migration changes from tracing#20, errors#18, and interceptors#25.

@ankurs ankurs merged commit 6db17e6 into main Mar 28, 2026
6 checks passed
@ankurs ankurs deleted the feat/otel-migration branch March 28, 2026 09:12
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