Vishesh Duggar bio photo

Vishesh Duggar

CTO Software @vamstar. 15 years in tech. Entrepreneurial with a keen interest in product development and usability. Interested in working on high impact ideas.

Subscribe to my mailing list

Are you looking for a tech advisor or a CTO?

Contact on LinkedIn

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();
});

Close to 15 years in tech; I've served as a CTO and advisor to multiple organizations. Brought close to 20 products to market. As a founding member of multiple organizations I've done everything from tech to stratgey, sales, marketing, hiring, accounting and more. Experience in a variety of technologies including but not limited to AWS, Node, React, Serverless, ElasticSearch, Groovy, Java, Typescript, Angular, Grails, PHP, Drupal, Wordpress.

Always interested in looking at new tech, strategy and ways I can add value to organizations.

[Contact me.](https://www.linkedin.com/in/experienced-cto/).