-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
@@ -9,7 +9,7 @@ | |||
|
|||
# 7 mb size limit | |||
MAX_LAYER_COMPRESSED_SIZE_KB=$(expr 7 \* 1024) | |||
MAX_LAYER_UNCOMPRESSED_SIZE_KB=$(expr 18 \* 1024) | |||
MAX_LAYER_UNCOMPRESSED_SIZE_KB=$(expr 19 \* 1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as an aside. What's the point in checking the layer size if we're just gonna keep upping the limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question, I'm not sure. I guess to make sure we don't accidentally increase the size significantly without realizing?
@@ -48,7 +47,6 @@ START | |||
"_inferred_span.tag_source": "self", | |||
"_inferred_span.synchronicity": "sync", | |||
"http.method": "GET", | |||
"http.route":"/{proxy+}", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
datadog-lambda-js/src/trace/trigger.ts
Lines 299 to 318 in 56965ac
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?
@@ -38,7 +38,6 @@ START | |||
"_dd.p.tid": "XXXX", | |||
"_dd.p.dm": "-0", | |||
"service": "remappedApiGatewayServiceName", | |||
"version": "1.0.0", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
1a6fedd
to
1fd3596
Compare
What does this PR do?
Upgrades
dd-trace
tov4.50.0
Motivation
Load in new span pointer features: DataDog/dd-trace-js#4875
Testing Guidelines
Additional Notes
Types of Changes
Check all that apply