キャプチャ処理はhandler内で実⾏する import {capturePromise} from 'aws-xray-sdk-core' capturePromise() export const handler = async ( event: APIGatewayProxyEventBase ): Promise => { // ...略 } Error: Missing AWS Lambda trace data for X-Ray. Ensure Active Tracing is enabled and no subsegments are created outside the function handler.
ユニットテスト実⾏時はsetContextMissingStrategyを describe('some tests', () => { beforeEach(()=>{ setContextMissingStrategy('IGNORE_ERROR') }) }) Error: Failed to get the current sub/segment from the context. のエラーを抑⽌