Vishesh Duggar bio photo

Vishesh Duggar

5x founder. Co-founder & CTO Product @vamstar. 15+ years building and advising startups of all sizes. If you're building something cool, I'd love to hear about it.

Looking for advice on product, strategy or engineering?

Book Appointment

Subscribe to my mailing list


Vamstar LinkedIn Twitter Github

Manual tracing with Xray can be cumbersome and you don’t really need it. Here is how you can setup automatic mode up without a middleware or outside express.

So if you have a dockerized nodejs service running you can change the entrypoint of your service to something like this.

import AWSXRay from 'aws-xray-sdk-core';

AWSXRay.captureAWS(require('aws-sdk'));
AWSXRay.enableAutomaticMode();

var ns = AWSXRay.getNamespace();

ns.run(async function() {
  var segment = new AWSXRay.Segment('Service Name');
  AWSXRay.setSegment(segment);

  /// Call your service code or entrypoint here
  segment.close();
});

15+ Years strategising and delivering growth, engineering, customer value and more. I have served as a CTO to multiple organizations, including Vamstar, AtruHelp, Billaway, SuperSehat, and more.

If you're a founder or CEO eager to move faster and seek tailored strategies for your unique challenges, don't navigate this journey alone. Reach out to me. Together, we can dissect, refine, and optimize your enterprise's trajectory to withstand the tests of time and innovation. Let's make your vision not just a goal, but an impending reality.

I have limited open hours. Book Appointment