-
Notifications
You must be signed in to change notification settings - Fork 1k
test(rabbitmq): add coverage for new network semantic conventions #14749
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?
test(rabbitmq): add coverage for new network semantic conventions #14749
Conversation
* | ||
* <p>Test-only; no production code changed. | ||
*/ | ||
public class RabbitMqNewNetAttributesTest { |
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.
Is there any reason not to make changes in the existing test classes where it already has all the container setup code etc?
There are already some assertions for network attributes, if you think there is something missing, you could look to update things there instead of a new class?
7b9b238
to
dd5def2
Compare
🔧 The result from spotlessApply was committed to the PR branch. |
Thanks for the feedback! I moved the assertions into the existing RabbitMqTest (reusing container/setup) and removed the extra class. The updated verifyNetAttributes accepts either legacy (network.peer.) or the newer semconv (server./client.*) keys via AttributeKey, so it passes under both configurations without production changes. |
We don't implement the latest version of the messaging semantic conventions and thus don't emit attributes like |
All checks have passed and the branch is up to date with my latest changes. |
@bhawnapannu2701 I'm sorry but we won't be merging this PR since the instrumentation does not emit these attributes. When the instrumentation is update we'll be using a flag like Lines 48 to 55 in c5da90a
Line 379 in c5da90a
If you wish to work on updating the messaging attributes try to follow the established conventions used for updating the database conventions. Since this is going to be large project and will also involve changes in the span structure my advice would be for you to start small. Don't attempt to do everything in one PR. |
This PR has been labeled as stale due to lack of activity and needing author feedback. It will be automatically closed if there is no further activity over the next 7 days. |
The existing RabbitMQ tests cover legacy network attributes. The spec now defines new network keys (e.g.,
network.peer.address/port
,server.address/port
). This test publishes and consumes a message and asserts that recorded spans contain at least one of the new attributes, increasing coverage without touching production code.• Test-only change, no production code touched
• Runs locally with: gradlew test -p instrumentation/rabbitmq-2.7/javaagent
• Formatted via spotlessApply