[SVLS-8230] Fix SnapStart cold_start tag using restore_time#1139
Draft
jchrostek-dd wants to merge 1 commit intomainfrom
Draft
[SVLS-8230] Fix SnapStart cold_start tag using restore_time#1139jchrostek-dd wants to merge 1 commit intomainfrom
jchrostek-dd wants to merge 1 commit intomainfrom
Conversation
SnapStart restore invocations were misclassified as proactive_initialization because sandbox_init_time (from snapshot creation) always exceeded the 10s threshold. Fix by tracking restore_time from PlatformRestoreStart telemetry and using it for proactive init detection in SnapStart functions. When restore_time is None (telemetry not yet delivered), assume cold start since the restore and invoke happened close together. https://datadoghq.atlassian.net/browse/SVLS-8230
a128599 to
cd3f0af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cold_start=falsebecause the time-threshold heuristic inset_init_tags()compared againstsandbox_init_time(set at snapshot creation), which always exceeded the 10s proactive initialization threshold.restore_timefromPlatformRestoreStarttelemetry event and use it instead ofsandbox_init_timefor SnapStart functions.restore_timeisNone(telemetry not yet delivered), assume cold start — the 10s threshold far exceeds telemetry delivery latency, so a missing event means restore and invoke happened close together.cold_start=true/cold_start=falseintegration test assertions for SnapStart restore and warm invocations (Java + .NET).Changes
bottlecap/src/config/aws.rsis_snapstart()methodbottlecap/src/lifecycle/invocation/processor.rsrestore_time: Option<DateTime<Utc>>field, set fromPlatformRestoreStart, use inset_init_tags()integration-tests/tests/snapstart.test.tscold_starttag assertions for restore (true) and warm (false) invocationsTest plan
cold_starttag assertionscargo checkpasseshttps://datadoghq.atlassian.net/browse/SVLS-8230