Nest Xray

screenshot of Nest Xray
nestjs

Distributed tracing for Nestjs with AWS X-Ray as the backend. Instrument incoming and outgoing HTTP requests

Overview

The @narando/nest-xray module brings the powerful capabilities of AWS X-Ray to Nest.js applications, enhancing their observability and robustness. With distributed tracing, developers can effortlessly track and analyze the flow of requests within their microservices architecture. This module is perfectly tailored for those looking to optimize their Nest.js services while gaining insights into latency and performance bottlenecks.

By integrating this module, Nest.js developers can automatically handle trace management, enabling them to focus on building features instead of worrying about the intricacies of tracing. The module is designed to work seamlessly with both HTTP servers, utilizing the express.js framework, and provides a straightforward installation and setup process.

Features

  • Supported Environments: Primarily integrates with the HTTP application model using express or fastify, enabling automatic trace metadata reading for incoming requests.
  • HttpService Compatibility: Acts as a drop-in replacement for the HttpService from @nestjs/axios, automatically tracing all requests and managing necessary headers.
  • Custom Subsegment Creation: Allows manual creation of subsegments to gain deeper insights into specific functions or service calls.
  • Automatic Segmentation: Automatically creates a new segment that tracks request URLs and additional metadata, ensuring detailed request logging and analysis.
  • Version Compatibility: The v1 release supports NestJS Version 6 and 7, while v2 is built for Versions 8 and 9, offering flexibility based on the project's version requirements.
  • TracingService Utility: Provides access to the current segment and the ability to create new subsegments for tailored tracing flexibility.
  • Potential Environment Expansibility: There are plans for supporting additional environments, such as GraphQL and microservices, enhancing the package's utility across various Nest.js usage scenarios.
nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.