[Instrumentation.AWSLambda] Incoming FaaS Span attributes: detect and set attribute for cold start - #2037
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2037 +/- ##
==========================================
+ Coverage 73.91% 75.77% +1.85%
==========================================
Files 267 20 -247
Lines 9615 227 -9388
==========================================
- Hits 7107 172 -6935
+ Misses 2508 55 -2453
Flags with carried forward coverage won't be shown. Click here to find out more. |
Kielek
left a comment
There was a problem hiding this comment.
LGTM.
Consider if any tests needs to be added/extended.
| var functionTags = AWSLambdaUtils.GetFunctionTags(input, context); | ||
| // No parallel invocation of the same lambda handler. | ||
| bool faasColdStart = isColdStart; | ||
| if (faasColdStart) |
There was a problem hiding this comment.
The if can be removed, it's fine to unconditionally set it to false here. Then we also might not need the local variable if you change it after calculating functionTags
There was a problem hiding this comment.
Yes, we can do it. I removed the local variable and moved setting of the internal one after the calculation of functionTags.
|
Yes, this should be unit-testable, please add or extend one to verify the coldstart attribute going from true on the first call to false on subsequent ones. |
I added test for the cold start tag check. |
|
One more thing, please extend changelog. |
changelog has been updated. |
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Fixes #
Design discussion issue #
Changes
Please provide a brief description of the changes here.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes