Custom Segments
Monitor custom code blocks inside your application.
Thanks to Inspector you can add custom items to the transaction's timeline getting a real-time feedback about the execution of a code block inside your application.
By default Inspector will report many type of statements, 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 impacting more in any execution cycle.
Below you can see an example of how custom segments will appear in the timeline:

A new segment in the timeline
Access the code examples below based on your preferred platform.
Platform
Platform
Documentation
Documentation
Platform
PHP (PHP, Laravel, Symfony, Slim, CodeIgniter)
Documentation
Platform
NodeJs (nodejs, express, fastify)
Documentation