feat(bottlecap): Update Step Functions trace extraction#591
Conversation
|
|
||
| #[allow(clippy::module_name_repetitions)] | ||
| #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] | ||
| pub struct LegacyStepFunctionEvent { |
There was a problem hiding this comment.
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.
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.
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
astuyve
left a comment
There was a problem hiding this comment.
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)); |
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
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.RetryCountandExecution.RedriveCountfor 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.RetryCountthe 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)
