Custom Tags on Request
For use of the
Tagged
Transactions feature, you need the setTags
, addTag
, removeTag
, or
getTags
functions on our PHP Extension API.
The
Page Cache Hit Rate API is internally using the transaction tagging feature
with the cached and uncached tags.
|
<?php
if (class_exists('Tideways\Profiler')) {
\Tideways\Profiler::addTag('one');
\Tideways\Profiler::setTags(['two', 'three']);
\Tideways\Profiler::removeTag('three');
\Tideways\Profiler::markPageCacheHit();
echo implode(", ", \Tideways\Profiler::getTags()); // two, cached
}
You can set up to three tags per request.
Calling the setTags
function will overwrite the entire list of tags,
including those set by the
Page Cache
Hit Rate API.
Still need help?
Email [email protected]