-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: Support StepFunction->StepFunction trace merging #326
Conversation
src/datadog-step-functions.ts
Outdated
@@ -26,6 +29,12 @@ export class DatadogStepFunctions extends Construct { | |||
return buildStepFunctionLambdaStepPayloadToMergeTraces(payload); | |||
} | |||
|
|||
public static buildStepFunctionTaskPayloadToMergeTraces(payload: { [key: string]: any } = {}): { |
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.
*/ | ||
|
||
export function buildStepFunctionSfnExecutionStepPayloadToMergeTraces(payload: { [key: string]: any } = {}): { | ||
[key: string]: any; |
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.
@@ -26,6 +29,12 @@ | |||
return buildStepFunctionLambdaStepPayloadToMergeTraces(payload); | |||
} | |||
|
|||
public static buildStepFunctionTaskPayloadToMergeTraces(payload: { [key: string]: any } = {}): { | |||
[key: string]: any; |
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.
src/span-link.ts
Outdated
* @throws {ConflictError} If the payload already contains `CONTEXT` or `CONTEXT.$` fields. | ||
*/ | ||
|
||
export function buildStepFunctionSfnExecutionStepPayloadToMergeTraces(payload: { [key: string]: any } = {}): { |
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.
f6c4700
to
b48ae76
Compare
faacd0d
to
b58f77d
Compare
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.
LGTM, thanks Yiming!
src/datadog-step-functions.ts
Outdated
@@ -26,6 +29,12 @@ export class DatadogStepFunctions extends Construct { | |||
return buildStepFunctionLambdaTaskPayloadToMergeTraces(payload); | |||
} | |||
|
|||
public static buildStepFunctionTaskPayloadToMergeTraces(payload: { [key: string]: any } = {}): { |
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.
nit: StepFunctions have "Input" argument while Lambda has "Payload" argument
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.
Good catch! Will fix.
b58f77d
to
44dabdc
Compare
What does this PR do?
Support merging Step Function traces with downstream StepFunction StartExecution task traces.
If the user constructs the task using:
then we will add these fields to the input to the State Machine:
Motivation
Testing Guidelines
Testing Guidelines
Automated testing
Passed the added unit tests.
Manual testing
Steps
Result
Additional Notes
Types of Changes
Check all that apply