Setting up a Function-level Tracing
Function-level tracing enriches your timeline with timings of individual function and method calls.
Depending on your build process, there are several ways of setting up the function-level tracing.
Babel Plugin#
One way of setting a function-level tracing up is using a recap.dev Babel plugin.
1. Install The Babel Plugin#
or
2. Add The Plugin to Your .babelrc File#
Check the complete source code of an example ExpressJS project traced with recap.dev Babel plugin here
TypeScript Transformer#
One way of setting a function-level tracing up is using a recap.dev TypeScript transformer.
This is probably the easiest way to set it up for projects built with just a tsc command.
1. Install Transformer Typescript (ttypescript) Wrapper for Your Typescript Compiler#
Read more on the ttypescript package here
or
2. Install the Recap.Dev Typescript Transformer#
or
3. Add the Transformer to Your tsconfig.json File#
4. Modify Your Build Script to Use ttsc Instead of tsc#
Use the ttsc and ttserver commands instead of tsc and tserver respectively to automatically apply the recap.dev TypeScript transformer.
Check the complete source code of an example ExpressJS project traced with recap.dev TypeScript transformer here