src/Agent.php
public function customMetric(string $metric, float $value): bool
    {
        if (!$this->isLoaded()) {
            return false;
        }

        return newrelic_custom_metric($metric, $value);
    }
public function customMetric(string $metric, float $value): bool
    {
        if (!$this->isLoaded()) {
            return false;
        }

        return newrelic_custom_metric($metric, $value);
    }
Add a custom metric (in milliseconds) to time a component of your app not captured by default.

Compatible with all agent versions.

@see https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newreliccustommetric-php-agent-api

@param string $metric Name your custom metrics with a Custom/ prefix (for example, Custom/MyMetric)
@param float  $value  Records timing in milliseconds. For example: a value of 4 is stored as .004 seconds
in New Relic's systems

@return bool