-
Notifications
You must be signed in to change notification settings - Fork 13
feat(bottlecap): Update Step Functions trace extraction #591
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
Conversation
@@ -14,13 +14,6 @@ use crate::{ | |||
}, | |||
}; | |||
|
|||
#[allow(clippy::module_name_repetitions)] | |||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] | |||
pub struct LegacyStepFunctionEvent { |
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.
This was never used as we were just unpacking "Payload": {...}
if it existed rather than treating them as separate events
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.
Oh good catch, it was being covered, just not through this struct
format!("{hi_tid:x}"), | ||
)]); | ||
let (lo_tid, tags) = | ||
if let (Some(trace_id), Some(trace_tags)) = (&self.trace_id, &self.trace_tags) { |
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.
We wouldn't need this if-else checking if we defined separate events rather than including all fields in one and making some optional
But, this way we're keeping all the complexity in this file, otherwise we'd have to match on all the different types of events in the span_inferrer
This logic will need infrequent edits so it made sense to me to pull it down similar to what we do in the python layer
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 pretty solid and well tested!
bottlecap/src/lifecycle/invocation/triggers/step_function_event.rs
Outdated
Show resolved
Hide resolved
let p = payload | ||
.get("Payload") | ||
.unwrap_or(&payload) | ||
.get("_datadog") | ||
.unwrap_or(payload.get("Payload").unwrap_or(&payload)); |
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.
This can be simplified
bottlecap/src/lifecycle/invocation/triggers/step_function_event.rs
Outdated
Show resolved
Hide resolved
bottlecap/src/lifecycle/invocation/triggers/step_function_event.rs
Outdated
Show resolved
Hide resolved
bottlecap/src/lifecycle/invocation/triggers/step_function_event.rs
Outdated
Show resolved
Hide resolved
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.
Left some comments!
ad55c16
to
e8cfc56
Compare
/merge |
View all feedbacks in Devflow UI.
The median merge time in
abhinav.vedmala@datadoghq.com cancelled this merge request build |
/remove |
View all feedbacks in Devflow UI.
|
What
Updates the creation of trace context from a Step Function execution's context object to...
State.RetryCount
andExecution.RedriveCount
for inferable parent ID generation in a backwards compatible manner (related to Update Step Functions Parent ID Generation datadog-lambda-python#559)Why
Parity of DataDog/datadog-agent#34264
State.RetryCount
the other values we use for the hash are identical across triesTesting
Expanded unit tests to account for new cases
Live trace of the nested step function trace merging (SFN -> SFN -> Lambda)

Live trace of the lambda root trace merging (Lambda -> SFN -> SFN -> Lambda)
