diff --git a/instrumentation/jms-1.1/src/jms2Test/groovy/JMS2Test.groovy b/instrumentation/jms-1.1/src/jms2Test/groovy/JMS2Test.groovy index 72b8b9eeac28..1612acc4df70 100644 --- a/instrumentation/jms-1.1/src/jms2Test/groovy/JMS2Test.groovy +++ b/instrumentation/jms-1.1/src/jms2Test/groovy/JMS2Test.groovy @@ -265,6 +265,9 @@ class JMS2Test extends AgentTestRunner { } } + // passing messageId = null will verify message.id is not captured, + // passing messageId = "" will verify message.id is captured (but won't verify anything about the value), + // any other value for messageId will verify that message.id is captured and has that same value static consumerSpan(TraceAssert trace, int index, String destinationType, String destinationName, String messageId, Object parentOrLinkedSpan, Operation operation) { trace.span(index) { operationName destinationName + " " + operation.name() diff --git a/instrumentation/jms-1.1/src/test/groovy/JMS1Test.groovy b/instrumentation/jms-1.1/src/test/groovy/JMS1Test.groovy index 4b76411ecea0..0f0690ff79ad 100644 --- a/instrumentation/jms-1.1/src/test/groovy/JMS1Test.groovy +++ b/instrumentation/jms-1.1/src/test/groovy/JMS1Test.groovy @@ -272,6 +272,9 @@ class JMS1Test extends AgentTestRunner { } } + // passing messageId = null will verify message.id is not captured, + // passing messageId = "" will verify message.id is captured (but won't verify anything about the value), + // any other value for messageId will verify that message.id is captured and has that same value static consumerSpan(TraceAssert trace, int index, String destinationType, String destinationName, String messageId, Object parentOrLinkedSpan, Operation operation) { trace.span(index) { operationName destinationName + " " + operation.name()