Closed obenkenobi closed 3 months ago
Attention: Patch coverage is 60.19417%
with 41 lines
in your changes missing coverage. Please review.
Project coverage is 69.76%. Comparing base (
464aa44
) to head (cae16b6
). Report is 423 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
aws-mq-rebased is where the MQ changes are pulled to to prevent pollution from dynamo db changes
Overview
This PR adds new span attributes containing endpoint information from a message broker. This is so the Java Agent can properly link with infrastructure entities generated from AWS MQ.
The new span attributes are the following:
server.address
which contain the message broker hostserver.port
which contain the message broker port.messaging.rabbitmq.destination.routing_key
which is the routing key for a RabbitMQ operationmessaging.destination.name
which will be the destination for a RabbitMQ operation. For producers this will be the exchange name. For consumers this is the queue name.messaging.destination_publish.name
is an otel attribute for message consumers used to indicate what the destination name for the producer is. In the case of RabbitMQ, this is the exchange name.The externals API has new optional parameters to add host and port for message broker spans, via the method
instance(host,port)
.For example
Our JMS (if ActiveMQ is used) and RabbitMQ instrumentation automatically add the span attributes.
To get host and port from ActiveMQ, a new instrumentation module was added called
activemq-client-5.8.0
On top of that, the
rabbit-amqp
andjms
instrumentation was altered to automatically include host and port span attributes.For our RabbitMQ instrumentation, the existing agent attributes
message.routingKey
andmessage.queueName
are also added to spans.In addition the instrumentation was revised so instrumentation module names better match the versions they apply to and to allow host and port information to be reported.
Related Github Issue
https://github.com/newrelic/newrelic-java-agent/issues/1876 https://github.com/newrelic/newrelic-java-agent/issues/1832