Create X-Ray subsegments and add Tracing Header for use with X-Ray in manual mode.
npm install --save @bbc/http-transport-xray
Use per call. Pass in a segment to create a subsegment for that call, identified by the host name.
const HttpTransport = require('@bbc/http-transport');
const AWSXRay = require('aws-xray-sdk');
const xray = require('@bbc/http-transport-xray').middleware;
const segment = new AWSXRay.Segment('mySegment');
const client = HttpTransport.createClient();
client
.use(xray(segment))
.get(url)
.asResponse();
npm test