I am using https://typeorm.io/#/ in my nodejs project to connect to Postgresql. My app is running in AWS lambda and I'd like to enable xray for performance analysis. With xray sdk, I can do something like below code:
var AWSXRay = require('aws-xray-sdk');
var pg = AWSXRay.capturePostgres(require('pg'));
var client = new pg.Client();
the above code will send query trace data to xray for instrumenting. However, I don't know how to make it work with typeorm
since it hides the pg
client from my code. Is there a way to capturePostgres inside typeorm
?