diff --git a/instrumentation/aws-java-sdk-sqs-1.10.44/build.gradle b/instrumentation/aws-java-sdk-sqs-1.10.44/build.gradle index 2dc97a56f0..d9708d11f1 100644 --- a/instrumentation/aws-java-sdk-sqs-1.10.44/build.gradle +++ b/instrumentation/aws-java-sdk-sqs-1.10.44/build.gradle @@ -8,7 +8,8 @@ dependencies { jar { - manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.aws-java-sdk-sqs-1.10.44' } + manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.aws-java-sdk-sqs-spans-1.10.44', 'Enabled': 'false', + 'Implementation-Title-Alias': 'aws-java-sdk-sqs' } } verifyInstrumentation { @@ -25,4 +26,4 @@ verifyInstrumentation { site { title 'AWS SQS' type 'Messaging' -} +} \ No newline at end of file diff --git a/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/amazonaws/services/sqs/AmazonSQS_Instrumentation.java b/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/amazonaws/services/sqs/AmazonSQS_Instrumentation.java index 616eb5b5da..ba996c7dc3 100644 --- a/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/amazonaws/services/sqs/AmazonSQS_Instrumentation.java +++ b/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/amazonaws/services/sqs/AmazonSQS_Instrumentation.java @@ -7,12 +7,16 @@ package com.amazonaws.services.sqs; +import com.amazonaws.services.sqs.model.MessageAttributeValue; import com.amazonaws.services.sqs.model.ReceiveMessageRequest; import com.amazonaws.services.sqs.model.ReceiveMessageResult; import com.amazonaws.services.sqs.model.SendMessageBatchRequest; +import com.amazonaws.services.sqs.model.SendMessageBatchRequestEntry; import com.amazonaws.services.sqs.model.SendMessageBatchResult; import com.amazonaws.services.sqs.model.SendMessageRequest; import com.amazonaws.services.sqs.model.SendMessageResult; +import com.newrelic.api.agent.HeaderType; +import com.newrelic.api.agent.Headers; import com.newrelic.api.agent.MessageConsumeParameters; import com.newrelic.api.agent.MessageProduceParameters; import com.newrelic.api.agent.NewRelic; @@ -20,29 +24,170 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.newrelic.utils.MetricUtil; +import com.newrelic.utils.SqsV1Util; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; @Weave(type = MatchType.Interface, originalName = "com.amazonaws.services.sqs.AmazonSQS") public class AmazonSQS_Instrumentation { @Trace public SendMessageBatchResult sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics(sendMessageBatchRequest.getQueueUrl()); + for (SendMessageBatchRequestEntry request : sendMessageBatchRequest.getEntries()) { + SQSBatchRequestHeaders headers = new SQSBatchRequestHeaders(request); + NewRelic.getAgent().getTransaction().insertDistributedTraceHeaders(headers); + } + + MessageProduceParameters messageProduceParameters = SqsV1Util.generateExternalProduceMetrics(sendMessageBatchRequest.getQueueUrl()); NewRelic.getAgent().getTracedMethod().reportAsExternal(messageProduceParameters); return Weaver.callOriginal(); } @Trace public SendMessageResult sendMessage(SendMessageRequest sendMessageRequest) { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics(sendMessageRequest.getQueueUrl()); + SQSRequestHeaders headers = new SQSRequestHeaders(sendMessageRequest); + NewRelic.getAgent().getTransaction().insertDistributedTraceHeaders(headers); + + MessageProduceParameters messageProduceParameters = SqsV1Util.generateExternalProduceMetrics(sendMessageRequest.getQueueUrl()); NewRelic.getAgent().getTracedMethod().reportAsExternal(messageProduceParameters); return Weaver.callOriginal(); } @Trace public ReceiveMessageResult receiveMessage(ReceiveMessageRequest receiveMessageRequest) { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics(receiveMessageRequest.getQueueUrl()); + List updatedMessageAttrNames = new ArrayList<>(receiveMessageRequest.getMessageAttributeNames()); + Collections.addAll(updatedMessageAttrNames, SqsV1Util.DT_HEADERS); + receiveMessageRequest.setMessageAttributeNames(updatedMessageAttrNames); + + MessageConsumeParameters messageConsumeParameters = SqsV1Util.generateExternalConsumeMetrics(receiveMessageRequest.getQueueUrl()); NewRelic.getAgent().getTracedMethod().reportAsExternal(messageConsumeParameters); return Weaver.callOriginal(); } + + public static class SQSRequestHeaders implements Headers { + private SendMessageRequest request = null; + public SQSRequestHeaders(SendMessageRequest req) { + request = req; + } + @Override + public HeaderType getHeaderType() { + return HeaderType.MESSAGE; + } + @Override + public String getHeader(String name) { + Map messageAttributes = request.getMessageAttributes(); + if(messageAttributes != null) { + MessageAttributeValue value = messageAttributes.get(name); + if (value != null && value.getDataType().equalsIgnoreCase("string")) { + return value.getStringValue(); + } + } + Map customRequestHeaders = request.getCustomRequestHeaders(); + if(customRequestHeaders != null) { + return customRequestHeaders.get(name); + } + return null; + } + @Override + public Collection getHeaders(String name) { + String value = getHeader(name); + if(value != null) { + return Collections.singletonList(value); + } + return Collections.emptyList(); + } + @Override + public void setHeader(String name, String value) { + if(request != null) { + Map existingAttributes = request.getMessageAttributes(); + if(!existingAttributes.containsKey(name)) { + request.addMessageAttributesEntry(name, new MessageAttributeValue().withDataType("String").withStringValue(value)); + } + } + } + @Override + public void addHeader(String name, String value) { + if(request != null) { + Map existingAttributes = request.getMessageAttributes(); + if(!existingAttributes.containsKey(name)) { + request.addMessageAttributesEntry(name, new MessageAttributeValue().withDataType("String").withStringValue(value)); + } + } + } + @Override + public Collection getHeaderNames() { + Map messageAttributes = request.getMessageAttributes(); + return messageAttributes.keySet(); + } + @Override + public boolean containsHeader(String name) { + return getHeaderNames().contains(name); + } + } + + public static class SQSBatchRequestHeaders implements Headers { + private SendMessageBatchRequestEntry requestEntry = null; + public SQSBatchRequestHeaders(SendMessageBatchRequestEntry re) { + requestEntry = re; + } + @Override + public HeaderType getHeaderType() { + return HeaderType.MESSAGE; + } + @Override + public String getHeader(String name) { + Map attributes = requestEntry.getMessageAttributes(); + if(attributes != null) { + MessageAttributeValue value = attributes.get(name); + if(value != null) { + String dataType = value.getDataType(); + if(dataType.equalsIgnoreCase("String")) { + String stringValue = value.getStringValue(); + if(stringValue != null) return stringValue; + } + } + } + return null; + } + @Override + public Collection getHeaders(String name) { + List list = new ArrayList(); + String value = getHeader(name); + if(value != null && !value.isEmpty()) { + list.add(value); + } + return list; + } + @Override + public void setHeader(String name, String value) { + if(requestEntry != null) { + requestEntry.addMessageAttributesEntry(name, new MessageAttributeValue().withDataType("String").withStringValue(value)); + } + } + @Override + public void addHeader(String name, String value) { + if(requestEntry != null) { + requestEntry.addMessageAttributesEntry(name, new MessageAttributeValue().withDataType("String").withStringValue(value)); + } + } + @Override + public Collection getHeaderNames() { + if(requestEntry != null) { + Map attributes = requestEntry.getMessageAttributes(); + if(attributes != null) { + return attributes.keySet(); + } + } + return Collections.emptyList(); + } + @Override + public boolean containsHeader(String name) { + return getHeaderNames().contains(name); + } + } + } diff --git a/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/newrelic/utils/MetricUtil.java b/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/newrelic/utils/SqsV1Util.java similarity index 92% rename from instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/newrelic/utils/MetricUtil.java rename to instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/newrelic/utils/SqsV1Util.java index ca53c047b1..d56d89cc7a 100644 --- a/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/newrelic/utils/MetricUtil.java +++ b/instrumentation/aws-java-sdk-sqs-1.10.44/src/main/java/com/newrelic/utils/SqsV1Util.java @@ -14,10 +14,11 @@ import com.newrelic.api.agent.Segment; import com.newrelic.api.agent.weaver.Weaver; -public class MetricUtil { +public class SqsV1Util { public static final String LIBRARY = "SQS"; public static final String OTEL_LIBRARY = "aws_sqs"; + public static final String[] DT_HEADERS = new String[] {"newrelic","NEWRELIC","NewRelic","tracestate","TraceState","TRACESTATE"}; public static MessageProduceParameters generateExternalProduceMetrics(String queueUrl) { DestinationData destinationData = DestinationData.parse(queueUrl); diff --git a/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/amazonaws/services/sqs/SqsClientTest.java b/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/amazonaws/services/sqs/SqsClientTest.java index 0c037b731c..c5910e5ba6 100644 --- a/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/amazonaws/services/sqs/SqsClientTest.java +++ b/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/amazonaws/services/sqs/SqsClientTest.java @@ -13,12 +13,14 @@ import com.amazonaws.services.sqs.model.CreateQueueResult; import com.amazonaws.services.sqs.model.ReceiveMessageRequest; import com.amazonaws.services.sqs.model.SendMessageBatchRequest; +import com.amazonaws.services.sqs.model.SendMessageBatchRequestEntry; import com.amazonaws.services.sqs.model.SendMessageRequest; import com.newrelic.agent.introspec.InstrumentationTestConfig; import com.newrelic.agent.introspec.InstrumentationTestRunner; import com.newrelic.agent.introspec.Introspector; import com.newrelic.agent.introspec.TracedMetricData; import com.newrelic.api.agent.Trace; +import com.newrelic.utils.SqsV1Util; import org.elasticmq.NodeAddress; import org.elasticmq.rest.sqs.SQSRestServer; import org.elasticmq.rest.sqs.SQSRestServerBuilder; @@ -27,7 +29,13 @@ import org.junit.Test; import org.junit.runner.RunWith; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; @RunWith(InstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = { "com.amazonaws.services.sqs" }, configName = "dt_enabled.yml") @@ -67,7 +75,13 @@ public static void afterClass() { @Test public void testSendMessage() { Introspector introspector = InstrumentationTestRunner.getIntrospector(); - sendMessageRequest(); + SendMessageRequest request = sendMessageRequest(); + + Set dtHeaders = new HashSet<>(Arrays.asList(SqsV1Util.DT_HEADERS)); + boolean containsDtHeaders = request.getMessageAttributes().entrySet().stream().anyMatch(e -> + dtHeaders.contains(e.getKey()) && e.getValue() != null && !e.getValue().getStringValue().isEmpty()); + assertTrue("Message request must contain headers", containsDtHeaders); + assertEquals(1, introspector.getFinishedTransactionCount(10000)); String txName = introspector.getTransactionNames().iterator().next(); @@ -77,9 +91,17 @@ public void testSendMessage() { @Test public void testSendMessageBatch() { Introspector introspector = InstrumentationTestRunner.getIntrospector(); - sendMessageBatch(); + SendMessageBatchRequest request = sendMessageBatch(); assertEquals(1, introspector.getFinishedTransactionCount(10000)); + Set dtHeaders = new HashSet<>(Arrays.asList(SqsV1Util.DT_HEADERS)); + assertFalse("Batch request must contain at least one entry", request.getEntries().isEmpty()); + for (SendMessageBatchRequestEntry entry: request.getEntries()) { + boolean containsDtHeaders = entry.getMessageAttributes().entrySet().stream().anyMatch(e -> + dtHeaders.contains(e.getKey()) && e.getValue() != null && !e.getValue().getStringValue().isEmpty()); + assertTrue("Message entry must contain headers", containsDtHeaders); + } + String txName = introspector.getTransactionNames().iterator().next(); checkScopedMetricCount(txName, "MessageBroker/SQS/Queue/Produce/Named/" + QUEUE_NAME, 1); } @@ -95,15 +117,24 @@ public void testReceiveMessage() { } @Trace(dispatcher = true) - private void sendMessageRequest() { + private SendMessageRequest sendMessageRequest() { SendMessageRequest request = (new SendMessageRequest()).withQueueUrl(queueUrl).withMessageBody("body"); sqsClient.sendMessage(request); + return request; } @Trace(dispatcher = true) - private void sendMessageBatch() { - SendMessageBatchRequest request = (new SendMessageBatchRequest()).withQueueUrl(queueUrl); - sqsClient.sendMessageBatch(request); + private SendMessageBatchRequest sendMessageBatch() { + SendMessageBatchRequestEntry entry = new SendMessageBatchRequestEntry(); + SendMessageBatchRequest request = (new SendMessageBatchRequest()).withQueueUrl(queueUrl) + .withEntries(entry); + try { + sqsClient.sendMessageBatch(request); + } catch (Exception e) { + // Do nothing + } + + return request; } @Trace(dispatcher = true) diff --git a/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/newrelic/utils/MetricUtilTest.java b/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/newrelic/utils/SqsV1UtilTest.java similarity index 81% rename from instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/newrelic/utils/MetricUtilTest.java rename to instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/newrelic/utils/SqsV1UtilTest.java index 6a9fe20757..8a4ff67e3b 100644 --- a/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/newrelic/utils/MetricUtilTest.java +++ b/instrumentation/aws-java-sdk-sqs-1.10.44/src/test/java/com/newrelic/utils/SqsV1UtilTest.java @@ -13,11 +13,11 @@ import org.junit.Assert; import org.junit.Test; -public class MetricUtilTest { +public class SqsV1UtilTest { @Test public void testGenerateProduceMetricsGoodQueueName() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("path/myQueue"); + MessageProduceParameters messageProduceParameters = SqsV1Util.generateExternalProduceMetrics("path/myQueue"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("myQueue", messageProduceParameters.getDestinationName()); @@ -28,7 +28,7 @@ public void testGenerateProduceMetricsGoodQueueName() { @Test public void testGenerateProduceMetricsBadQueueName() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("path"); + MessageProduceParameters messageProduceParameters = SqsV1Util.generateExternalProduceMetrics("path"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("unknown", messageProduceParameters.getDestinationName()); @@ -39,7 +39,7 @@ public void testGenerateProduceMetricsBadQueueName() { @Test public void testGenerateConsumeMetricsGoodQueueName() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("path/myQueue"); + MessageConsumeParameters messageConsumeParameters = SqsV1Util.generateExternalConsumeMetrics("path/myQueue"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("myQueue", messageConsumeParameters.getDestinationName()); @@ -50,7 +50,7 @@ public void testGenerateConsumeMetricsGoodQueueName() { @Test public void testGenerateConsumeMetricsBadQueueName() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("path"); + MessageConsumeParameters messageConsumeParameters = SqsV1Util.generateExternalConsumeMetrics("path"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("unknown", messageConsumeParameters.getDestinationName()); @@ -61,7 +61,7 @@ public void testGenerateConsumeMetricsBadQueueName() { @Test public void testGenerateConsumeAwsUrl() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); + MessageConsumeParameters messageConsumeParameters = SqsV1Util.generateExternalConsumeMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageConsumeParameters.getDestinationName()); @@ -72,7 +72,7 @@ public void testGenerateConsumeAwsUrl() { @Test public void testGenerateConsumeOtherUrl() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("https://localhost/123456789012/MyQueue"); + MessageConsumeParameters messageConsumeParameters = SqsV1Util.generateExternalConsumeMetrics("https://localhost/123456789012/MyQueue"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageConsumeParameters.getDestinationName()); @@ -83,7 +83,7 @@ public void testGenerateConsumeOtherUrl() { @Test public void testGenerateProduceAwsUrl() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); + MessageProduceParameters messageProduceParameters = SqsV1Util.generateExternalProduceMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageProduceParameters.getDestinationName()); @@ -94,7 +94,7 @@ public void testGenerateProduceAwsUrl() { @Test public void testGenerateProduceOtherUrl() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("https://localhost/123456789012/MyQueue"); + MessageProduceParameters messageProduceParameters = SqsV1Util.generateExternalProduceMetrics("https://localhost/123456789012/MyQueue"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageProduceParameters.getDestinationName()); diff --git a/instrumentation/aws-java-sdk-sqs-2.1.0/build.gradle b/instrumentation/aws-java-sdk-sqs-2.1.0/build.gradle index a7a3f5cbd9..b057646fe6 100644 --- a/instrumentation/aws-java-sdk-sqs-2.1.0/build.gradle +++ b/instrumentation/aws-java-sdk-sqs-2.1.0/build.gradle @@ -8,7 +8,8 @@ dependencies { jar { - manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.aws-java-sdk-sqs-2.1.0' } + manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.aws-java-sdk-sqs-spans-2.1.0', 'Enabled': 'false', + 'Implementation-Title-Alias': 'aws-java-sdk-sqs' } } verifyInstrumentation { diff --git a/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/com/newrelic/utils/MetricUtil.java b/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/com/newrelic/utils/SqsV2Util.java similarity index 92% rename from instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/com/newrelic/utils/MetricUtil.java rename to instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/com/newrelic/utils/SqsV2Util.java index ca53c047b1..7cacbcc347 100644 --- a/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/com/newrelic/utils/MetricUtil.java +++ b/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/com/newrelic/utils/SqsV2Util.java @@ -14,10 +14,11 @@ import com.newrelic.api.agent.Segment; import com.newrelic.api.agent.weaver.Weaver; -public class MetricUtil { +public class SqsV2Util { public static final String LIBRARY = "SQS"; public static final String OTEL_LIBRARY = "aws_sqs"; + public static final String[] DT_HEADERS = new String[] {"newrelic","NEWRELIC","NewRelic","tracestate","TraceState","TRACESTATE"}; public static MessageProduceParameters generateExternalProduceMetrics(String queueUrl) { DestinationData destinationData = DestinationData.parse(queueUrl); diff --git a/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsAsyncClient_Instrumentation.java b/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsAsyncClient_Instrumentation.java index af826d9ff2..71f54c030e 100644 --- a/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsAsyncClient_Instrumentation.java +++ b/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsAsyncClient_Instrumentation.java @@ -8,20 +8,30 @@ package software.amazon.awssdk.services.sqs; import com.newrelic.agent.bridge.AgentBridge; +import com.newrelic.api.agent.HeaderType; +import com.newrelic.api.agent.Headers; import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.Segment; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.newrelic.utils.MetricUtil; -import software.amazon.awssdk.core.client.config.SdkClientConfiguration; +import com.newrelic.utils.SqsV2Util; +import software.amazon.awssdk.services.sqs.model.MessageAttributeValue; import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest; import software.amazon.awssdk.services.sqs.model.ReceiveMessageResponse; import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequest; +import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequestEntry; import software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse; import software.amazon.awssdk.services.sqs.model.SendMessageRequest; import software.amazon.awssdk.services.sqs.model.SendMessageResponse; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; @@ -29,8 +39,13 @@ class DefaultSqsAsyncClient_Instrumentation { public CompletableFuture sendMessage(SendMessageRequest sendMessageRequest) { - Segment segment = NewRelic.getAgent().getTransaction().startSegment(MetricUtil.LIBRARY, "sendMessage"); - segment.reportAsExternal(MetricUtil.generateExternalProduceMetrics(sendMessageRequest.queueUrl())); + Segment segment = NewRelic.getAgent().getTransaction().startSegment(SqsV2Util.LIBRARY, "sendMessage"); + + SQSRequestHeaders headers = new SQSRequestHeaders(sendMessageRequest); + NewRelic.getAgent().getTransaction().insertDistributedTraceHeaders(headers); + sendMessageRequest = headers.getUpdatedRequest(); + + segment.reportAsExternal(SqsV2Util.generateExternalProduceMetrics(sendMessageRequest.queueUrl())); AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false); CompletableFuture result = Weaver.callOriginal(); @@ -40,14 +55,23 @@ public CompletableFuture sendMessage(SendMessageRequest sen return result.whenComplete(new BiConsumer() { @Override public void accept(SendMessageResponse sendMessageResponse, Throwable throwable) { - MetricUtil.finishSegment(segment); + SqsV2Util.finishSegment(segment); } }); } public CompletableFuture sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) { - Segment segment = NewRelic.getAgent().getTransaction().startSegment(MetricUtil.LIBRARY, "sendMessageBatch"); - segment.reportAsExternal(MetricUtil.generateExternalProduceMetrics(sendMessageBatchRequest.queueUrl())); + Segment segment = NewRelic.getAgent().getTransaction().startSegment(SqsV2Util.LIBRARY, "sendMessageBatch"); + + List updatedEntries = new ArrayList<>(); + for (SendMessageBatchRequestEntry entry : sendMessageBatchRequest.entries()) { + SQSBatchRequestHeaders headers = new SQSBatchRequestHeaders(entry); + NewRelic.getAgent().getTransaction().insertDistributedTraceHeaders(headers); + updatedEntries.add(headers.updatedEntry()); + } + sendMessageBatchRequest = sendMessageBatchRequest.toBuilder().entries(updatedEntries).build(); + + segment.reportAsExternal(SqsV2Util.generateExternalProduceMetrics(sendMessageBatchRequest.queueUrl())); AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false); CompletableFuture result = Weaver.callOriginal(); @@ -57,14 +81,19 @@ public CompletableFuture sendMessageBatch(SendMessageB return result.whenComplete(new BiConsumer() { @Override public void accept(SendMessageBatchResponse sendMessageBatchResponse, Throwable throwable) { - MetricUtil.finishSegment(segment); + SqsV2Util.finishSegment(segment); } }); } public CompletableFuture receiveMessage(ReceiveMessageRequest receiveMessageRequest) { - Segment segment = NewRelic.getAgent().getTransaction().startSegment(MetricUtil.LIBRARY, "receiveMessage"); - segment.reportAsExternal(MetricUtil.generateExternalConsumeMetrics(receiveMessageRequest.queueUrl())); + Segment segment = NewRelic.getAgent().getTransaction().startSegment(SqsV2Util.LIBRARY, "receiveMessage"); + + ArrayList updatedMessageAttrNames = new ArrayList<>(receiveMessageRequest.messageAttributeNames()); + Collections.addAll(updatedMessageAttrNames, SqsV2Util.DT_HEADERS); + receiveMessageRequest = receiveMessageRequest.toBuilder().messageAttributeNames(updatedMessageAttrNames).build(); + + segment.reportAsExternal(SqsV2Util.generateExternalConsumeMetrics(receiveMessageRequest.queueUrl())); AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false); CompletableFuture result = Weaver.callOriginal(); @@ -74,8 +103,191 @@ public CompletableFuture receiveMessage(ReceiveMessageRe return result.whenComplete(new BiConsumer() { @Override public void accept(ReceiveMessageResponse receiveMessageResponse, Throwable throwable) { - MetricUtil.finishSegment(segment); + SqsV2Util.finishSegment(segment); } }); } + + /* + * Headers are used as inner classes to avoid class loading errors when running instrumentation tests + * */ + + public class SQSRequestHeaders implements Headers { + + private SendMessageRequest request = null; + private Map additionalAttributes = new Hashtable(); + + public SQSRequestHeaders(SendMessageRequest req) { + request = req; + } + + @Override + public HeaderType getHeaderType() { + return HeaderType.MESSAGE; + } + + @Override + public String getHeader(String name) { + Map messageAttributes = request.messageAttributes(); + if(messageAttributes != null) { + MessageAttributeValue value = messageAttributes.get(name); + if (value != null && value.dataType().equalsIgnoreCase("string")) { + return value.stringValue(); + } + } + + return null; + } + + @Override + public Collection getHeaders(String name) { + List list = new ArrayList(); + String value = getHeader(name); + if(value != null) { + list.add(value); + } + return list; + } + + @Override + public void setHeader(String name, String value) { + if(request != null) { + Map existingAttributes = request.messageAttributes(); + if(!existingAttributes.containsKey(name)) { + additionalAttributes.put(name, value); + } + } + } + + @Override + public void addHeader(String name, String value) { + setHeader(name, value); + } + + @Override + public Collection getHeaderNames() { + Map messageAttributes = request.messageAttributes(); + return messageAttributes.keySet(); + } + + @Override + public boolean containsHeader(String name) { + return getHeaderNames().contains(name); + } + + public SendMessageRequest getUpdatedRequest() { + SendMessageRequest.Builder builder = request.toBuilder(); + Map msgAttributes = request.messageAttributes(); + + Map updatedAttributes = new HashMap(); + + if(msgAttributes != null && !msgAttributes.isEmpty()) { + updatedAttributes.putAll(msgAttributes); + } + + for(String key : additionalAttributes.keySet()) { + MessageAttributeValue newValue = MessageAttributeValue.builder().dataType("String").stringValue(additionalAttributes.get(key)).build(); + updatedAttributes.put(key, newValue); + } + builder.messageAttributes(updatedAttributes); + + SendMessageRequest updated = builder.build(); + return updated; + } + } + + public class SQSBatchRequestHeaders implements Headers { + + private SendMessageBatchRequestEntry requestEntry = null; + private Map additionalAttributes = new Hashtable(); + + public SQSBatchRequestHeaders(SendMessageBatchRequestEntry re) { + requestEntry = re; + } + + @Override + public HeaderType getHeaderType() { + return HeaderType.MESSAGE; + } + + @Override + public String getHeader(String name) { + Map attributes = requestEntry.messageAttributes(); + if(attributes != null) { + MessageAttributeValue value = attributes.get(name); + if(value != null) { + String dataType = value.dataType(); + if(dataType.equalsIgnoreCase("String")) { + return value.stringValue(); + } + } + } + return null; + } + + @Override + public Collection getHeaders(String name) { + List list = new ArrayList(); + String value = getHeader(name); + if(value != null && !value.isEmpty()) { + list.add(value); + } + return list; + } + + @Override + public void setHeader(String name, String value) { + if(requestEntry != null) { + if(!requestEntry.messageAttributes().containsKey(name)) { + additionalAttributes.put(name, value); + } + } + } + + @Override + public void addHeader(String name, String value) { + if(requestEntry != null) { + if(!requestEntry.messageAttributes().containsKey(name)) { + additionalAttributes.put(name, value); + } + } + } + + @Override + public Collection getHeaderNames() { + if(requestEntry != null) { + Map attributes = requestEntry.messageAttributes(); + if(attributes != null) { + return attributes.keySet(); + } + } + return Collections.emptyList(); + } + + @Override + public boolean containsHeader(String name) { + return getHeaderNames().contains(name); + } + + public SendMessageBatchRequestEntry updatedEntry() { + SendMessageBatchRequestEntry.Builder builder = requestEntry.toBuilder(); + Map msgAttributes = requestEntry.messageAttributes(); + + Map updatedAttributes = new HashMap(); + + if(msgAttributes != null && !msgAttributes.isEmpty()) { + updatedAttributes.putAll(msgAttributes); + } + + for(String key : additionalAttributes.keySet()) { + MessageAttributeValue newValue = MessageAttributeValue.builder().dataType("String").stringValue(additionalAttributes.get(key)).build(); + updatedAttributes.put(key, newValue); + } + builder.messageAttributes(updatedAttributes); + + SendMessageBatchRequestEntry updated = builder.build(); + + return updated; + } + } } diff --git a/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsClient_Instrumentation.java b/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsClient_Instrumentation.java index 6ff797b3ee..05f6f77d19 100644 --- a/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsClient_Instrumentation.java +++ b/instrumentation/aws-java-sdk-sqs-2.1.0/src/main/java/software/amazon/awssdk/services/sqs/DefaultSqsClient_Instrumentation.java @@ -7,6 +7,8 @@ package software.amazon.awssdk.services.sqs; +import com.newrelic.api.agent.HeaderType; +import com.newrelic.api.agent.Headers; import com.newrelic.api.agent.MessageConsumeParameters; import com.newrelic.api.agent.MessageProduceParameters; import com.newrelic.api.agent.NewRelic; @@ -14,36 +16,246 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.newrelic.utils.MetricUtil; -import software.amazon.awssdk.core.client.config.SdkClientConfiguration; +import com.newrelic.utils.SqsV2Util; +import software.amazon.awssdk.services.sqs.model.MessageAttributeValue; import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest; import software.amazon.awssdk.services.sqs.model.ReceiveMessageResponse; import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequest; +import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequestEntry; import software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse; import software.amazon.awssdk.services.sqs.model.SendMessageRequest; import software.amazon.awssdk.services.sqs.model.SendMessageResponse; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; + @Weave(type = MatchType.ExactClass, originalName = "software.amazon.awssdk.services.sqs.DefaultSqsClient") class DefaultSqsClient_Instrumentation { @Trace public SendMessageBatchResponse sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics(sendMessageBatchRequest.queueUrl()); + List updatedEntries = new ArrayList<>(); + for (SendMessageBatchRequestEntry entry : sendMessageBatchRequest.entries()) { + SQSBatchRequestHeaders headers = new SQSBatchRequestHeaders(entry); + NewRelic.getAgent().getTransaction().insertDistributedTraceHeaders(headers); + updatedEntries.add(headers.updatedEntry()); + } + sendMessageBatchRequest = sendMessageBatchRequest.toBuilder().entries(updatedEntries).build(); + + MessageProduceParameters messageProduceParameters = SqsV2Util.generateExternalProduceMetrics(sendMessageBatchRequest.queueUrl()); NewRelic.getAgent().getTracedMethod().reportAsExternal(messageProduceParameters); + return Weaver.callOriginal(); } @Trace public SendMessageResponse sendMessage(SendMessageRequest sendMessageRequest) { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics(sendMessageRequest.queueUrl()); + SQSRequestHeaders headers = new SQSRequestHeaders(sendMessageRequest); + NewRelic.getAgent().getTransaction().insertDistributedTraceHeaders(headers); + sendMessageRequest = headers.getUpdatedRequest(); + + MessageProduceParameters messageProduceParameters = SqsV2Util.generateExternalProduceMetrics(sendMessageRequest.queueUrl()); NewRelic.getAgent().getTracedMethod().reportAsExternal(messageProduceParameters); + return Weaver.callOriginal(); } @Trace public ReceiveMessageResponse receiveMessage(ReceiveMessageRequest receiveMessageRequest) { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics(receiveMessageRequest.queueUrl()); + ArrayList updatedMessageAttrNames = new ArrayList<>(receiveMessageRequest.messageAttributeNames()); + Collections.addAll(updatedMessageAttrNames, SqsV2Util.DT_HEADERS); + receiveMessageRequest = receiveMessageRequest.toBuilder().messageAttributeNames(updatedMessageAttrNames).build(); + + MessageConsumeParameters messageConsumeParameters = SqsV2Util.generateExternalConsumeMetrics(receiveMessageRequest.queueUrl()); NewRelic.getAgent().getTracedMethod().reportAsExternal(messageConsumeParameters); + return Weaver.callOriginal(); } + + /* + * Headers are used as inner classes to avoid class loading errors when running instrumentation tests + * */ + + public class SQSRequestHeaders implements Headers { + + private SendMessageRequest request = null; + private Map additionalAttributes = new Hashtable(); + + public SQSRequestHeaders(SendMessageRequest req) { + request = req; + } + + @Override + public HeaderType getHeaderType() { + return HeaderType.MESSAGE; + } + + @Override + public String getHeader(String name) { + Map messageAttributes = request.messageAttributes(); + if(messageAttributes != null) { + MessageAttributeValue value = messageAttributes.get(name); + if (value != null && value.dataType().equalsIgnoreCase("string")) { + return value.stringValue(); + } + } + + return null; + } + + @Override + public Collection getHeaders(String name) { + List list = new ArrayList(); + String value = getHeader(name); + if(value != null) { + list.add(value); + } + return list; + } + + @Override + public void setHeader(String name, String value) { + if(request != null) { + Map existingAttributes = request.messageAttributes(); + if(!existingAttributes.containsKey(name)) { + additionalAttributes.put(name, value); + } + } + } + + @Override + public void addHeader(String name, String value) { + setHeader(name, value); + } + + @Override + public Collection getHeaderNames() { + Map messageAttributes = request.messageAttributes(); + return messageAttributes.keySet(); + } + + @Override + public boolean containsHeader(String name) { + return getHeaderNames().contains(name); + } + + public SendMessageRequest getUpdatedRequest() { + SendMessageRequest.Builder builder = request.toBuilder(); + Map msgAttributes = request.messageAttributes(); + + Map updatedAttributes = new HashMap(); + + if(msgAttributes != null && !msgAttributes.isEmpty()) { + updatedAttributes.putAll(msgAttributes); + } + + for(String key : additionalAttributes.keySet()) { + MessageAttributeValue newValue = MessageAttributeValue.builder().dataType("String").stringValue(additionalAttributes.get(key)).build(); + updatedAttributes.put(key, newValue); + } + builder.messageAttributes(updatedAttributes); + + SendMessageRequest updated = builder.build(); + return updated; + } + } + + public class SQSBatchRequestHeaders implements Headers { + + private SendMessageBatchRequestEntry requestEntry = null; + private Map additionalAttributes = new Hashtable(); + + public SQSBatchRequestHeaders(SendMessageBatchRequestEntry re) { + requestEntry = re; + } + + @Override + public HeaderType getHeaderType() { + return HeaderType.MESSAGE; + } + + @Override + public String getHeader(String name) { + Map attributes = requestEntry.messageAttributes(); + if(attributes != null) { + MessageAttributeValue value = attributes.get(name); + if(value != null) { + String dataType = value.dataType(); + if(dataType.equalsIgnoreCase("String")) { + return value.stringValue(); + } + } + } + return null; + } + + @Override + public Collection getHeaders(String name) { + List list = new ArrayList(); + String value = getHeader(name); + if(value != null && !value.isEmpty()) { + list.add(value); + } + return list; + } + + @Override + public void setHeader(String name, String value) { + if(requestEntry != null) { + if(!requestEntry.messageAttributes().containsKey(name)) { + additionalAttributes.put(name, value); + } + } + } + + @Override + public void addHeader(String name, String value) { + if(requestEntry != null) { + if(!requestEntry.messageAttributes().containsKey(name)) { + additionalAttributes.put(name, value); + } + } + } + + @Override + public Collection getHeaderNames() { + if(requestEntry != null) { + Map attributes = requestEntry.messageAttributes(); + if(attributes != null) { + return attributes.keySet(); + } + } + return Collections.emptyList(); + } + + @Override + public boolean containsHeader(String name) { + return getHeaderNames().contains(name); + } + + public SendMessageBatchRequestEntry updatedEntry() { + SendMessageBatchRequestEntry.Builder builder = requestEntry.toBuilder(); + Map msgAttributes = requestEntry.messageAttributes(); + + Map updatedAttributes = new HashMap(); + + if(msgAttributes != null && !msgAttributes.isEmpty()) { + updatedAttributes.putAll(msgAttributes); + } + + for(String key : additionalAttributes.keySet()) { + MessageAttributeValue newValue = MessageAttributeValue.builder().dataType("String").stringValue(additionalAttributes.get(key)).build(); + updatedAttributes.put(key, newValue); + } + builder.messageAttributes(updatedAttributes); + + return builder.build(); + } + } + } diff --git a/instrumentation/aws-java-sdk-sqs-2.1.0/src/test/java/com/newrelic/utils/MetricUtilTest.java b/instrumentation/aws-java-sdk-sqs-2.1.0/src/test/java/com/newrelic/utils/SqsV2UtilTest.java similarity index 81% rename from instrumentation/aws-java-sdk-sqs-2.1.0/src/test/java/com/newrelic/utils/MetricUtilTest.java rename to instrumentation/aws-java-sdk-sqs-2.1.0/src/test/java/com/newrelic/utils/SqsV2UtilTest.java index 4538749b1d..c5b6160e49 100644 --- a/instrumentation/aws-java-sdk-sqs-2.1.0/src/test/java/com/newrelic/utils/MetricUtilTest.java +++ b/instrumentation/aws-java-sdk-sqs-2.1.0/src/test/java/com/newrelic/utils/SqsV2UtilTest.java @@ -13,11 +13,11 @@ import org.junit.Assert; import org.junit.Test; -public class MetricUtilTest { +public class SqsV2UtilTest { @Test public void testGenerateProduceMetricsGoodQueueName() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("path/myQueue"); + MessageProduceParameters messageProduceParameters = SqsV2Util.generateExternalProduceMetrics("path/myQueue"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("myQueue", messageProduceParameters.getDestinationName()); @@ -28,7 +28,7 @@ public void testGenerateProduceMetricsGoodQueueName() { @Test public void testGenerateProduceMetricsBadQueueName() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("path"); + MessageProduceParameters messageProduceParameters = SqsV2Util.generateExternalProduceMetrics("path"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("unknown", messageProduceParameters.getDestinationName()); @@ -39,7 +39,7 @@ public void testGenerateProduceMetricsBadQueueName() { @Test public void testGenerateConsumeMetricsGoodQueueName() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("path/myQueue"); + MessageConsumeParameters messageConsumeParameters = SqsV2Util.generateExternalConsumeMetrics("path/myQueue"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("myQueue", messageConsumeParameters.getDestinationName()); @@ -50,7 +50,7 @@ public void testGenerateConsumeMetricsGoodQueueName() { @Test public void testGenerateConsumeMetricsBadQueueName() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("path"); + MessageConsumeParameters messageConsumeParameters = SqsV2Util.generateExternalConsumeMetrics("path"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("unknown", messageConsumeParameters.getDestinationName()); @@ -61,7 +61,7 @@ public void testGenerateConsumeMetricsBadQueueName() { @Test public void testGenerateConsumeAwsUrl() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); + MessageConsumeParameters messageConsumeParameters = SqsV2Util.generateExternalConsumeMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageConsumeParameters.getDestinationName()); @@ -72,7 +72,7 @@ public void testGenerateConsumeAwsUrl() { @Test public void testGenerateConsumeOtherUrl() { - MessageConsumeParameters messageConsumeParameters = MetricUtil.generateExternalConsumeMetrics("https://localhost/123456789012/MyQueue"); + MessageConsumeParameters messageConsumeParameters = SqsV2Util.generateExternalConsumeMetrics("https://localhost/123456789012/MyQueue"); Assert.assertEquals("SQS", messageConsumeParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageConsumeParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageConsumeParameters.getDestinationName()); @@ -83,7 +83,7 @@ public void testGenerateConsumeOtherUrl() { @Test public void testGenerateProduceAwsUrl() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); + MessageProduceParameters messageProduceParameters = SqsV2Util.generateExternalProduceMetrics("https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageProduceParameters.getDestinationName()); @@ -94,7 +94,7 @@ public void testGenerateProduceAwsUrl() { @Test public void testGenerateProduceOtherUrl() { - MessageProduceParameters messageProduceParameters = MetricUtil.generateExternalProduceMetrics("https://localhost/123456789012/MyQueue"); + MessageProduceParameters messageProduceParameters = SqsV2Util.generateExternalProduceMetrics("https://localhost/123456789012/MyQueue"); Assert.assertEquals("SQS", messageProduceParameters.getLibrary()); Assert.assertEquals("aws_sqs", messageProduceParameters.getOtelLibrary()); Assert.assertEquals("MyQueue", messageProduceParameters.getDestinationName()); diff --git a/settings.gradle b/settings.gradle index a9088d8229..8e095c1969 100644 --- a/settings.gradle +++ b/settings.gradle @@ -80,10 +80,10 @@ include 'instrumentation:aws-java-sdk-kinesis-2.18.40' include 'instrumentation:aws-java-sdk-lambda-1.11.280' include 'instrumentation:aws-java-sdk-lambda-2.1' include 'instrumentation:aws-java-sdk-sqs-1.10.44' +include 'instrumentation:aws-java-sdk-sqs-2.1.0' include 'instrumentation:aws-java-sdk-s3-1.2.13' include 'instrumentation:aws-java-sdk-s3-2.0' include 'instrumentation:aws-java-sdk-sns-1.11.12' -include 'instrumentation:aws-java-sdk-sqs-2.1.0' include 'instrumentation:aws-java-sdk-sns-2.0' include 'instrumentation:aws-wrap-0.7.0' include 'instrumentation:akka-2.2'