Inspector will decorate the fastify instance with a new property to access Inspector anywhere in your application:
1
fastify.inspector.addSegment(...);
Copied!
It's mandatory to call the Inspector instance inside your fastify instance to allow automatic tasks identification.
Custom Segments
By default Inspector will report many different tasks based on the application's dependencies, but you are free to "wrap" some parts of your code that you consider relevant to create a more complete picture of what statements are executed during an execution cycle and its performance.