DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
129 stars 55 forks source link

Revamp SFN->SFN context injection #1471

Closed lym953 closed 2 months ago

lym953 commented 2 months ago

What and why?

Revamps Step Function -> Step Function context injection:

  1. Change States.JsonMerge($$, $, false) to $$['Execution', 'State', 'StateMachine'], so the unnecessary Task won't be passed
  2. Revamp the case numbers. Currently the case numbers (1, 2.1, 2.2, 2.3, 3, 4.1, 4.2, 4.3) are in sync with the case numbers for SFN->Lambda context injection. However the cases for SFN->SFN is simpler because we are using a custom field name CONTEXT, which users are unlikely to use, so we can just not handle the rare case the CONTEXT field is set.
  3. Add test cases
  4. Add doc

Design doc: Fixing Step Function Instrumentation

Testing

Passed existing and new tests.

Review checklist

datadog-datadog-prod-us1[bot] commented 2 months ago

Datadog Report

Branch report: yiming.luo/fix-step-func-17 Commit report: 62a66ae Test service: datadog-ci-tests

:white_check_mark: 0 Failed, 404 Passed, 0 Skipped, 1m 28.4s Total duration (2m 5.59s time saved)