Hey has anyone successfully hooked up x-ray with p...
# aws
f
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
Copy code
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.
g
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?) https://pulumi-community.slack.com/archives/C01PF3E1B8V/p1629384278059100?thread_ts=1629368996.058400&cid=C01PF3E1B8V