Add Custom Event Marker to Timeline
These methods are only available with Tideways Extension Version 5.0.46 and higher. Please upgrade the extension to the latest version before using this API. |
In Tideways Trace Timelines you see a request from the beginning of until the end with the supported instrumentations for various frameworks and PHP extensions. Sometimes it is interesting to mark some point in your own code to give you more context when a function or an operation starts in your code, maybe with some additional metadata.
You can do this with the API-Call addEventMarker($label) and pass a marker string for example 'MyPointInCode'. The marker string for the API-Call can contain alphanumeric characters, a dash or underscore:
<?php
if (class_exists('Tideways\Profiler')) {
\Tideways\Profiler::addEventMarker('MyPointInCode');
}
Looking in the Timeline for the trace you will detect an orange line with your 'MyPointInCode' event marker:
Still need help?
Email [email protected]