Closed obenkenobi closed 3 months ago
Attention: Patch coverage is 37.93103%
with 36 lines
in your changes missing coverage. Please review.
Project coverage is 70.61%. Comparing base (
85e2eea
) to head (a7c7b9b
). Report is 11 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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. In addition, otel compatible attributes are also added (some are experimental) for routing keys and queues for RabbitMQ.
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