Enhance your PHP application's monitoring by accurately tracking its version using the atatus_set_app_version()
function. This practice is essential for effective application performance monitoring and debugging, as it allows you to correlate performance metrics and errors with specific application versions.
Compatibility
This function requires the Atatus PHP agent version 1.17.0 or higher. Ensure your agent is up to date to utilize this feature.
Syntax
atatus_set_app_version($version)
Parameter
Parameter | Type | Description |
---|---|---|
$version | String (Required) | Specifies the version of your application (e.g., "1.0.0"). |
Example
To set your application's version to 1.0.0
, include the following code in your PHP application:
copy
<?php
if (extension_loaded('atatus')) {
atatus_set_app_version("1.0.0");
}
This code checks if the Atatus extension is loaded and then sets the application version accordingly.