Merged
Conversation
felixbarny
reviewed
May 31, 2019
Member
felixbarny
left a comment
There was a problem hiding this comment.
Looks very good form a first look!
It would be great to follow up with an elastic/apm issue about changes in the intake API (queue/topic name) etc. But that can come in after merging this PR.
...apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsMessageConsumerInstrumentation.java
Outdated
Show resolved
Hide resolved
...ent-plugins/apm-jms-plugin/src/test/java/co/elastic/apm/agent/jms/Jms1InstrumentationIT.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #650 +/- ##
===========================================
- Coverage 66.73% 62.1% -4.63%
Complexity 68 68
===========================================
Files 196 199 +3
Lines 8802 7711 -1091
Branches 1209 945 -264
===========================================
- Hits 5874 4789 -1085
- Misses 2609 2625 +16
+ Partials 319 297 -22
Continue to review full report at Codecov.
|
felixbarny
reviewed
Jun 6, 2019
...gins/apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsInstrumentationHelperImpl.java
Outdated
Show resolved
Hide resolved
felixbarny
reviewed
Jun 6, 2019
...gins/apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsInstrumentationHelperImpl.java
Outdated
Show resolved
Hide resolved
felixbarny
reviewed
Jun 6, 2019
...apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsMessageListenerInstrumentation.java
Show resolved
Hide resolved
felixbarny
reviewed
Jun 6, 2019
...apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsMessageConsumerInstrumentation.java
Outdated
Show resolved
Hide resolved
felixbarny
reviewed
Jun 6, 2019
...apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsMessageConsumerInstrumentation.java
Outdated
Show resolved
Hide resolved
felixbarny
reviewed
Jun 6, 2019
...apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsMessageConsumerInstrumentation.java
Outdated
Show resolved
Hide resolved
felixbarny
reviewed
Jun 6, 2019
...apm-jms-plugin/src/main/java/co/elastic/apm/agent/jms/JmsMessageProducerInstrumentation.java
Outdated
Show resolved
Hide resolved
felixbarny
approved these changes
Jun 6, 2019
Contributor
Author
|
Jenkins test this please |
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.
Closes #466
Supports:
JMS 1.1 and 2, APIs:
send,receive,receiveNoWait,onMessage.Testing:
ActiveMQ (JMS 1.1), wrapped by a connection-pooling client and ActiveMQ Artemis (JMS 2) - the successor of HornetQ).
Implementation details:
MessageProducer#sendtraced and used for context propagation through Message String property. Since JMS 2 is an extension of JMS 1.1This is assumed to be enough to supportJMSProducer#send(JMS 2 API) as it likely one makes use of the other (tested with one library).JMSConsumer#receive,JMSConsumer#receivereceiveNoWaitandMessageListener#onMessageare traced for receiver side, reading the context from the message property and using it for distributed tracing.Assumptions and decisions made:
receiveAPI tracing can result either in a Transaction (if occurs on a non-traced thread) or a Span. If the latter, distributed tracing context will be ignored and span will remain child of its original parent.onMessagealways results in a transaction. The assumption is that it is never expected to be executed on an already traced thread.Not within the scope of this PR:
CompletionListener) both inJMSProducerandMessageProducer