-
Notifications
You must be signed in to change notification settings - Fork 625
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
Add exchange/routingKey to RabbitMessageSenderContext #2816
Conversation
The |
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.
Also add your name to the @author
list of all the affected classes.
Don't you think that we need to cover the change somehow in the tests?
Or that one is going to be follow up as a fix for the #2814 ?
Thanks
...main/java/org/springframework/amqp/rabbit/support/micrometer/RabbitMessageSenderContext.java
Show resolved
Hide resolved
...main/java/org/springframework/amqp/rabbit/support/micrometer/RabbitMessageSenderContext.java
Show resolved
Hide resolved
...main/java/org/springframework/amqp/rabbit/support/micrometer/RabbitMessageSenderContext.java
Show resolved
Hide resolved
This one is going to be follow up as a fix for the #2814 |
5749290
to
204b7b1
Compare
...main/java/org/springframework/amqp/rabbit/support/micrometer/RabbitMessageSenderContext.java
Show resolved
Hide resolved
...main/java/org/springframework/amqp/rabbit/support/micrometer/RabbitMessageSenderContext.java
Outdated
Show resolved
Hide resolved
return super.getLowCardinalityKeyValues(context).and("foo", "bar"); | ||
return super.getLowCardinalityKeyValues(context).and("foo", "bar") | ||
.and("messaging.destination.name", context.getExchange()) | ||
.and("messaging.rabbitmq.destination.routing_key", context.getRoutingKey()); |
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.
I guess this will go to TemplateLowCardinalityTags
in the next contribution.
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.
I think now it's more easier to determine exchange or routing key for doing traces/metrics without splitting /
in RabbitMessageSenderContext
.
@artembilan |
I follow your issue and added field exchange/routingkey. I think it will be easier for you to implement metrics/traces, and IMO it's not done yet. |
@ngocnhan-tran1996 ok you're right, I don't know why you needed to add those informations, it confused me since I knew I had that stuff to change :) |
I believe the original issue talks about adding something like:
into out-of-the-box convention. |
I see #2814 and I think
RabbitMessageSenderContext.java
should have fieldexchange
androutingKey
.But I think it's better if we use
MessageProperties#setReceivedExchange
andMessageProperties#setReceivedRoutingKey
instead.