08/18/2021, 8:16 PM
Hey has anyone successfully hooked up x-ray with pulumi’s magic function lambdas in typescript? With the traditional sdk xray integration looks something like this
import Lambda from 'aws-sdk/clients/lambda';
import { captureAWSClient } from 'aws-xray-sdk-core';

const client = captureAWSClient(new Lambda());
However since our lambda functions are managed through pulumi, there isn’t an easy way to apply this wrapper. Or if there is, I’ve completely missed it. I checked out the pulumi docs on the functiontracingconfig parameter, which gives me a high level trace (lambda execution time), but doesn’t go into the subcalls within the lambda like the capture client normally would.


08/20/2021, 3:05 AM
I'm not sure what mean by magic functions? AWS package does not offer you more than AWS Console does. Since Xray is a 3rd party package you need to install it. The thing you are missing is the packaging step that pulumi does not offer (yet?)