Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade dd-trace to v4.50.0 #590

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node16",
"resource:integration-tests-js-XXXX-process-input-traced_node16",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand Down Expand Up @@ -38,7 +38,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedApiGatewayServiceName",
"version": "1.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we figure out why this was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. Looks like it's just removed on the inferred span, but not the aws.lambda spans.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, that sounds fine then. I think it'll be important to make sure they remain on the aws.lambda span even if they're removed from the inferred span.

"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"http.url": "undefined",
Expand All @@ -48,7 +47,6 @@ START
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "sync",
"http.method": "GET",
"http.route":"/{proxy+}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we investigate why this tag moved from what looks like the inferred span to the invocation span?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time of creating #584
I still had the issue of not being able to update the snapshots. So I added the original lines manually, and I must have put them in the wrong place even though the tests still passed.

It seems like they should be in the invocation span, not the inferred span.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree. I think it should be on the inferred span since for an api.gateway span, that's where the idea of the routing is happening. Can we run these again and confirm where these tags are actually being added? This is the only trace out of all the test invocates in which it's been moved.

Copy link
Contributor Author

@nhulston nhulston Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code that sets the http.route tags is here:

if (event.resource) {
httpTags["http.route"] = event.resource;
}
return httpTags;
}
if (eventType.isAPIGatewayEventV2(event)) {
const requestContext = event.requestContext;
httpTags["http.url"] = requestContext.domainName;
httpTags["http.url_details.path"] = requestContext.http.path;
httpTags["http.method"] = requestContext.http.method;
if (event.headers?.Referer) {
httpTags["http.referer"] = event.headers.Referer;
}
if (event.routeKey) {
// "GET /my/endpoint" => "/my/endpoint"
const array = event.routeKey.split(" ");
httpTags["http.route"] = array[array.length - 1];
}
return httpTags;

If you backtrack the call stack, it starts at onStartInvocation and stores the result in this.triggerTags, so at least according to the code, we are setting the tags on the Lambda span -- not the API GW inferred span.

More info: https://datadoghq.atlassian.net/browse/SVLS-5779

But maybe we should also be adding the http.route tags to the inferred span?

"stage": "test",
"http.status_code": "200",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node16",
Expand Down Expand Up @@ -86,6 +84,7 @@ START
"function_trigger.event_source": "api-gateway",
"function_trigger.event_source_arn": "arn:aws:apigateway:eu-west-1::/restapis/wt6mne2s9k/stages/test",
"http.method": "GET",
"http.route": "/{proxy+}",
"api_gateway_request_id": "41b45ea3-70b5-11e6-b7bd-69b5aaebc7d9",
"event_type": "APIGateway",
"http.status_code": "200",
Expand Down Expand Up @@ -165,8 +164,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node16",
"resource:integration-tests-js-XXXX-process-input-traced_node16",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand Down Expand Up @@ -195,7 +194,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSnsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
"resource_names": "sns-lambda",
Expand Down Expand Up @@ -296,8 +294,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node16",
"resource:integration-tests-js-XXXX-process-input-traced_node16",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand Down Expand Up @@ -326,7 +324,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSqsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
"resource_names": "my-queue",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node18",
"resource:integration-tests-js-XXXX-process-input-traced_node18",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand Down Expand Up @@ -38,7 +38,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedApiGatewayServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"http.url": "undefined",
Expand All @@ -48,7 +47,6 @@ START
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "sync",
"http.method": "GET",
"http.route":"/{proxy+}",
"stage": "test",
"http.status_code": "200",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
Expand Down Expand Up @@ -86,6 +84,7 @@ START
"function_trigger.event_source": "api-gateway",
"function_trigger.event_source_arn": "arn:aws:apigateway:eu-west-1::/restapis/wt6mne2s9k/stages/test",
"http.method": "GET",
"http.route": "/{proxy+}",
"api_gateway_request_id": "41b45ea3-70b5-11e6-b7bd-69b5aaebc7d9",
"event_type": "APIGateway",
"http.status_code": "200",
Expand Down Expand Up @@ -165,8 +164,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node18",
"resource:integration-tests-js-XXXX-process-input-traced_node18",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand Down Expand Up @@ -195,7 +194,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSnsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
"resource_names": "sns-lambda",
Expand Down Expand Up @@ -296,8 +294,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node18",
"resource:integration-tests-js-XXXX-process-input-traced_node18",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand Down Expand Up @@ -326,7 +324,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSqsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
"resource_names": "my-queue",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node20",
"resource:integration-tests-js-XXXX-process-input-traced_node20",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs20.x"
],
Expand Down Expand Up @@ -38,7 +38,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedApiGatewayServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"http.url": "undefined",
Expand All @@ -48,7 +47,6 @@ START
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "sync",
"http.method": "GET",
"http.route":"/{proxy+}",
"stage": "test",
"http.status_code": "200",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node20",
Expand Down Expand Up @@ -86,6 +84,7 @@ START
"function_trigger.event_source": "api-gateway",
"function_trigger.event_source_arn": "arn:aws:apigateway:eu-west-1::/restapis/wt6mne2s9k/stages/test",
"http.method": "GET",
"http.route": "/{proxy+}",
"api_gateway_request_id": "41b45ea3-70b5-11e6-b7bd-69b5aaebc7d9",
"event_type": "APIGateway",
"http.status_code": "200",
Expand Down Expand Up @@ -165,8 +164,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node20",
"resource:integration-tests-js-XXXX-process-input-traced_node20",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs20.x"
],
Expand Down Expand Up @@ -195,7 +194,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSnsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
"resource_names": "sns-lambda",
Expand Down Expand Up @@ -296,8 +294,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-process-input-traced_node20",
"resource:integration-tests-js-XXXX-process-input-traced_node20",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs20.x"
],
Expand Down Expand Up @@ -326,7 +324,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSqsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
"resource_names": "my-queue",
Expand Down
13 changes: 5 additions & 8 deletions integration_tests/snapshots/logs/status-code-500s_node16.log
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node16",
"resource:integration-tests-js-XXXX-status-code-500s_node16",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand All @@ -23,8 +23,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node16",
"resource:integration-tests-js-XXXX-status-code-500s_node16",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand All @@ -44,7 +44,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedApiGatewayServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"http.url": "undefined",
Expand All @@ -54,7 +53,6 @@ START
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "sync",
"http.method": "GET",
"http.route":"/{proxy+}",
"stage": "test",
"http.status_code": "500",
"_dd.base_service": "integration-tests-js-XXXX-status-code-500s_node16",
Expand Down Expand Up @@ -92,6 +90,7 @@ START
"function_trigger.event_source": "api-gateway",
"function_trigger.event_source_arn": "arn:aws:apigateway:eu-west-1::/restapis/wt6mne2s9k/stages/test",
"http.method": "GET",
"http.route": "/{proxy+}",
"http.status_code": "500",
"_dd.base_service": "integration-tests-js-XXXX-status-code-500s_node16",
"language": "javascript"
Expand Down Expand Up @@ -121,8 +120,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node16",
"resource:integration-tests-js-XXXX-status-code-500s_node16",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand All @@ -142,7 +141,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSnsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
"resource_names": "sns-lambda",
Expand Down Expand Up @@ -217,8 +215,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node16",
"resource:integration-tests-js-XXXX-status-code-500s_node16",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs16.x"
],
Expand All @@ -238,7 +236,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSqsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
"resource_names": "my-queue",
Expand Down
13 changes: 5 additions & 8 deletions integration_tests/snapshots/logs/status-code-500s_node18.log
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node18",
"resource:integration-tests-js-XXXX-status-code-500s_node18",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand All @@ -23,8 +23,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node18",
"resource:integration-tests-js-XXXX-status-code-500s_node18",
"cold_start:true",
"memorysize:1024",
"cold_start:true",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand All @@ -44,7 +44,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedApiGatewayServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"http.url": "undefined",
Expand All @@ -54,7 +53,6 @@ START
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "sync",
"http.method": "GET",
"http.route":"/{proxy+}",
"stage": "test",
"http.status_code": "500",
"_dd.base_service": "integration-tests-js-XXXX-status-code-500s_node18",
Expand Down Expand Up @@ -92,6 +90,7 @@ START
"function_trigger.event_source": "api-gateway",
"function_trigger.event_source_arn": "arn:aws:apigateway:eu-west-1::/restapis/wt6mne2s9k/stages/test",
"http.method": "GET",
"http.route": "/{proxy+}",
"http.status_code": "500",
"_dd.base_service": "integration-tests-js-XXXX-status-code-500s_node18",
"language": "javascript"
Expand Down Expand Up @@ -121,8 +120,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node18",
"resource:integration-tests-js-XXXX-status-code-500s_node18",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand All @@ -142,7 +141,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSnsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
"resource_names": "sns-lambda",
Expand Down Expand Up @@ -217,8 +215,8 @@ START
"account_id:XXXX",
"functionname:integration-tests-js-XXXX-status-code-500s_node18",
"resource:integration-tests-js-XXXX-status-code-500s_node18",
"cold_start:false",
"memorysize:1024",
"cold_start:false",
"datadog_lambda:vX.X.X",
"runtime:nodejs18.x"
],
Expand All @@ -238,7 +236,6 @@ START
"_dd.p.tid": "XXXX",
"_dd.p.dm": "-0",
"service": "remappedSqsServiceName",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
"resource_names": "my-queue",
Expand Down
Loading
Loading