-
Notifications
You must be signed in to change notification settings - Fork 20
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
Improve duration accuracy for coldstarts #283
Comments
There is a nice side effect of the current implementation though... visibility into how much of the time was spent initializing the coldstart vs the code execution. We could maybe capture both of these? |
Recording the coldstart time within auto-tracing might be a solution to showing the initialization time? This is what Xray does iirc. |
Perhaps if it's a coldstart the duration should be reported as simply the |
AWS charges and reports the time of a function as including the coldstart initialization time. We do not detect the time spent during initialization and thus do not report this within the duration. This causes duration inaccuracies for coldstarts.
We could add logic that adjusts the duration reported when we're sending a report which is also a coldstart. In this case, we would set the recorded startTime according to the process start time, not when the user's function was invoked.
The text was updated successfully, but these errors were encountered: