feat(bottlecap): add Cold Start Span + Tags#450
Merged
duncanista merged 19 commits intojordan.gonzalez/bottlecap/universal-instrumentationfrom Nov 15, 2024
Merged
Conversation
…to jordan.gonzalez/bottlecap/cold-start-span
…to jordan.gonzalez/bottlecap/cold-start-span
…ve to calculate at points in time
also add a method to reset processor invocation state
duncanista
commented
Nov 13, 2024
| self.enhanced_metrics.set_report_log_metrics(&metrics); | ||
|
|
||
| if let Some(context) = self.context_buffer.remove(request_id) { | ||
| if let Some(context) = self.context_buffer.get(request_id) { |
Contributor
Author
There was a problem hiding this comment.
Doing a get since I wanna make sure that only when the buffer is empty, we can calculate the init tags correctly
alexgallotta
approved these changes
Nov 14, 2024
…to jordan.gonzalez/bottlecap/cold-start-span
81d1d62
into
jordan.gonzalez/bottlecap/universal-instrumentation
duncanista
added a commit
that referenced
this pull request
Nov 15, 2024
* add some helper functions to `invocation::lifecycle` mod * create cold start span on processor * move `generate_span_id` to father module * send `platform_init_start` data to processor * send `PlatformInitStart` to main bus * update cold start `parent_id` * fix start time of cold start span * enhanced metrics now have a `dynamic_value_tags` for tags which we have to calculate at points in time * `AwsConfig` now has a `sandbox_init_time` value * add `is_empty` to `ContextBuffer` * calculate init tags on invoke also add a method to reset processor invocation state * restart init tags on set * set tags properly for proactive init * fix unit test * remove debug line * make sure `cold_start` tag is only set in one place
duncanista
added a commit
that referenced
this pull request
Nov 19, 2024
* add some helper functions to `invocation::lifecycle` mod * create cold start span on processor * move `generate_span_id` to father module * send `platform_init_start` data to processor * send `PlatformInitStart` to main bus * update cold start `parent_id` * fix start time of cold start span * enhanced metrics now have a `dynamic_value_tags` for tags which we have to calculate at points in time * `AwsConfig` now has a `sandbox_init_time` value * add `is_empty` to `ContextBuffer` * calculate init tags on invoke also add a method to reset processor invocation state * restart init tags on set * set tags properly for proactive init * fix unit test * remove debug line * make sure `cold_start` tag is only set in one place
duncanpharvey
pushed a commit
that referenced
this pull request
Mar 10, 2026
* add some helper functions to `invocation::lifecycle` mod * create cold start span on processor * move `generate_span_id` to father module * send `platform_init_start` data to processor * send `PlatformInitStart` to main bus * update cold start `parent_id` * fix start time of cold start span * enhanced metrics now have a `dynamic_value_tags` for tags which we have to calculate at points in time * `AwsConfig` now has a `sandbox_init_time` value * add `is_empty` to `ContextBuffer` * calculate init tags on invoke also add a method to reset processor invocation state * restart init tags on set * set tags properly for proactive init * fix unit test * remove debug line * make sure `cold_start` tag is only set in one place
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.
What?
aws.lambda.cold_startspan on Cold Starts (or proactive inits), adds the correct tags to theaws.lambdaspan for cold starts.How?
Notes
ContextBuffernow doesn't remove onon_platform_report, instead, we held all invocations and await for the 6th one to remove some space. This is so we can calculate properly the tags on cold start.