I'm trying to get a custom X-Ray segment reporting, but I'm not seeing anything in the trace. My code looks something like this:
var AWSXRay = require('aws-xray-sdk-core');
AWSXRay.captureAsyncFunc('callSoapService', subsegment => {
doSomethingAsync(params, err => {
if (err) {
subsegment.close(err);
} else {
doSomethingElse().then(result => {
console.info('all done, now close the segment');
subsegment.close();
}, subsegment.close);
}
});
});
Do I need to add it to the parent segment or something?
ugh. there seems to be a bug with AWSXRay.captureHTTPs() - if I remove that call captureAsyncFunc() starts working
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With