Back to feed
Dev.to
Dev.to
7/21/2026
Structured Logging in Node.js: How a Business ID Became My correlationId

Structured Logging in Node.js: How a Business ID Became My correlationId

Short summary

A practical post on solving log correlation across AWS Step Functions Lambda pipelines by using the execution name field as a correlationId. Instead of generating a separate UUID, the author sets the Step Functions execution name to the business case ID, making it available in every state via $$.Execution.Name. This eliminates manual log piecing-together when execution history expires after 90 days.

  • Use AWS Step Functions execution name as correlationId instead of a separate UUID
  • $$.Execution.Name context variable is available in every state without manual passing
  • Solves the problem of correlating CloudWatch logs after execution history expires

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more