feat: add support for rabbitmq/amqp091-go tracing#5
Open
slagiewka wants to merge 1 commit intoopentracing-contrib:masterfrom
Open
feat: add support for rabbitmq/amqp091-go tracing#5slagiewka wants to merge 1 commit intoopentracing-contrib:masterfrom
rabbitmq/amqp091-go tracing#5slagiewka wants to merge 1 commit intoopentracing-contrib:masterfrom
Conversation
Author
|
@keithnoguchi @yurishkuro please have a look 😉 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the new rabbitmq/amqp091-go driver for OpenTracing instrumentation by introducing a separate package, amqp091tracer, that mirrors the functionality provided for the previous driver.
- Introduces a dedicated package (amqp091tracer) for tracing with the new driver.
- Adds tests for header propagation, injection, and extraction to verify the new implementation.
- Updates documentation and the README to reflect the support for rabbitmq/amqp091-go.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| amqp091tracer/propagation_test.go | Adds tests to validate header injection and extraction. |
| amqp091tracer/tracer_test.go | Adds tests for the Inject and Extract functions in tracer.go. |
| amqp091tracer/tracer.go | Implements Inject and Extract functions using the new driver. |
| amqp091tracer/propagation.go | Defines carrier type and methods for propagating tracing headers. |
| amqp091tracer/doc.go | Provides package documentation for amqp091tracer. |
| amqp091tracer/testtracer_test.go | Implements a test tracer to support unit testing of tracing. |
| README.md | Updates the README to include the new driver support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original AMQP driver continues development under official umbrella of rabbitmq.
In this PR I'm suggesting support for this new driver package via another package delivered by
go-amqp. Thanks to that projects upgrading to rabbitmq/amqp091-go can make the switch of tracing support deliberately.Other option would be to just upgrade
opentracing-contrib/go-amqp/amqpto depend on new driver instead. This however, would break compatibility for users that have not upgraded yet.Code is copied and adjusted for new driver location, entirely separating both paths. We can discuss whether we need to refactor and the two packages inside this project should reuse each others code.