type
is used.mysql
but each query has its own custom label that simply is an extract of the sql code.mysql
as type parameter and use the specific query string
or task name
as label for each statements of this type.startSegment()
method on the Inspector instance to manually control the monitoring of a code block:try/catch/finally
to be sure that your code block is monitored in a consistent way.addSegment()
that implements this strategy for you as seen above:start()
method, and the duration in the end()
method, as shown in the example below:addSegment()
method. Check it out on their specific documetation: