Improved NestJS Tracing with Recap.Dev
Arseny Yankovski
Lead Architect @ eMarketeerWe just released a new 1.9.0 version of the recap.dev JavaScript client which exports a new wrapNestJsModule
function. Which when used like this:
will record calls and their timings of the controllers and injectables in the NestJS module.
We decided to make it a function that wraps a module to allow you to trace your application to your liking.
Tracing individual functions allows for different unit naming strategies. One example is making the unit name a combination of an environment, controller name, and a controller method name. We can write a middleware to do that automatically.
This will result in a unit name like this: local-AppController.getHello
Check the complete source code of an example NestJS project traced with recap.dev here
Adding recap.dev to your application won't take more than 5 minutes.