atatus.startMessageTransaction function is used to initiate a transaction in Atatus for monitoring and tracking the processing of messages retrieved from an Amazon SQS queue. This function should be called whenever a message is processed after retrieving it using sqs.receiveMessage from the AWS SDK. It helps track the performance and attributes of message processing as a transaction.
When to Call
- Trigger Point: Call
atatus.startMessageTransactionimmediately after receiving a message viasqs.receiveMessageand before processing its contents. - Purpose: To monitor the lifecycle of message processing, including any custom logic or operations performed on the message.
- Context: Suitable for both AWS SDK v2 (e.g.,
aws-sdk) and v3 (e.g.,@aws-sdk/client-sqs) when handling SQS messages.