-
Notifications
You must be signed in to change notification settings - Fork 534
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
feat: Record AWS Lambda coldstarts #2403
feat: Record AWS Lambda coldstarts #2403
Conversation
f56c54d
to
c77981f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2403 +/- ##
==========================================
- Coverage 90.97% 90.67% -0.30%
==========================================
Files 146 156 +10
Lines 7492 7628 +136
Branches 1502 1575 +73
==========================================
+ Hits 6816 6917 +101
- Misses 676 711 +35
|
requestIsColdStart = false; | ||
} else { | ||
// Check whether it is proactive initialization or not: | ||
// https://aaronstuyvenberg.com/posts/understanding-proactive-initialization |
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.
🤯
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.
Looks reasonable to me. I think this can be merged. I left a minor suggestion, but if you don't want to do it that's fine. Just comment and we'll merge this when you're ready.
plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts
Outdated
Show resolved
Hide resolved
@dyladan Are you suggesting to update semconv package and update all semconv attributes in all places accordingly? If so, I think it should be done in a separate PR. I have used |
I had been thinking only the newly introduced attribute would use the new format. The old formats are still exported for backward compatibility. but leaving it for a followup is also fine. |
Which problem is this PR solving?
Adds recording AWS Lambda invocation coldstarts as Lambda invocation span attributes.
Short description of the changes
Decides whether an AWS Lambda invocation is coldstart or not by taking care of the following cases: