Detecting Service Name

Tideways supports collecting requests in different services. To change the service name from the default "web", you can use a programmatic APIs. The service name can contain alphanumeric characters, a dash or underscore. It must not contain spaces or other non-alphanumeric characters or it will be rejected.

For example, you can set the service at runtime with:

if (class_exists('Tideways\Profiler')) {
     \Tideways\Profiler::setServiceName('myservice1');
}

Or if you are starting profiling Programmatically within your PHP code you can set it as well:

if (class_exists('Tideways\Profiler')) {
    \Tideways\Profiler::start(['api_key' => 'XYZ', 'service' => 'myservice1']);
}
Still need help? Email [email protected]