Skip to content

Commit 15a60ac

Browse files
committed
use config in v1
1 parent 17e429f commit 15a60ac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/main/java/datadog/trace/instrumentation/aws/v0/AwsSdkClientDecorator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ public AgentSpan onRequest(final AgentSpan span, final Request request) {
183183
bestPeerService = tableName;
184184
}
185185

186-
String serverlessFunction = System.getenv("AWS_LAMBDA_FUNCTION_NAME");
187-
// Set peer.service based on environment
188-
if (serverlessFunction != null && !serverlessFunction.isEmpty()) {
186+
// Set peer.service based on Config for serverless functions
187+
if (Config.get().isAwsServerless()) {
189188
URI uri = request.getEndpoint();
190189
String hostname = uri.getHost();
191190
if (uri.getPort() != -1) {

0 commit comments

Comments
 (0)