NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️

Once my team have to track the application behavior after it had been deployed to production for a few months. We are looking for an easy way to add the tracing things on top of production-ready application. so we developed this package. nestjs-jaeger-…


This content originally appeared on DEV Community and was authored by Anuwong Mongkudkornburee

Once my team have to track the application behavior after it had been deployed to production for a few months. We are looking for an easy way to add the tracing things on top of production-ready application. so we developed this package. nestjs-jaeger-tracing.

To use this module, you just import TracingModule to your AppModule and initiate with forRoot() to add app level interceptor to deserialize microservice payload. Then add serializer which will inject tracing id to payload, like this.

import { TracingModule } from '@dollarsign/nestjs-jaeger-tracing';
import { Module } from '@nestjs/common';
import { ClientsModule, Transport } from '@nestjs/microservices';

@Module({
  imports: [
    TracingModule.forRoot({
      exporterConfig: {
        serviceName: 'core-service', // service name that will be shown in jaeger dashboard
      },
      isSimpleSpanProcessor: true, // true for development.
    }),
    ClientsModule.register([
      {
        name: 'MATH_SERVICE',
        transport: Transport.TCP,
        options: {
          port: 3001,
          ...TracingModule.getParserOptions(), // this method will return serializer that inject tracing id to microservice payload.
        },
      },
    ]),
  ],
})
export class AppModule {}

Now, your application will be sent data to jaeger agent so you can trace your application in Jaeger Dashboard. hurayyyy!

It has so much work to do more, so feel free to use and contribute for your works.


This content originally appeared on DEV Community and was authored by Anuwong Mongkudkornburee


Print Share Comment Cite Upload Translate Updates
APA

Anuwong Mongkudkornburee | Sciencx (2021-04-30T16:41:49+00:00) NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️. Retrieved from https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/

MLA
" » NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️." Anuwong Mongkudkornburee | Sciencx - Friday April 30, 2021, https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/
HARVARD
Anuwong Mongkudkornburee | Sciencx Friday April 30, 2021 » NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️., viewed ,<https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/>
VANCOUVER
Anuwong Mongkudkornburee | Sciencx - » NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/
CHICAGO
" » NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️." Anuwong Mongkudkornburee | Sciencx - Accessed . https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/
IEEE
" » NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️." Anuwong Mongkudkornburee | Sciencx [Online]. Available: https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/. [Accessed: ]
rf:citation
» NestJS Jaeger(and others) Tracing Module for microservices. You’ll loved it! ❤️ | Anuwong Mongkudkornburee | Sciencx | https://www.scien.cx/2021/04/30/nestjs-jaegerand-others-tracing-module-for-microservices-youll-loved-it-%e2%9d%a4%ef%b8%8f/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.