diff --git a/platform-includes/metrics/usage/php.laravel.mdx b/platform-includes/metrics/usage/php.laravel.mdx index 0def0843b3229..c65936401feb3 100644 --- a/platform-includes/metrics/usage/php.laravel.mdx +++ b/platform-includes/metrics/usage/php.laravel.mdx @@ -1,4 +1,4 @@ -Metrics are enabled by default in the PHP SDK. After the SDK is initialized, you can send metric data through `\Sentry\trace_metrics()`, which acts as the entry point for recording counts, gauges, and distributions. +Metrics are enabled by default in the PHP SDK. After the SDK is initialized, you can send metric data through `\Sentry\traceMetrics()`, which acts as the entry point for recording counts, gauges, and distributions. The SDK buffers up to 1000 metric entries at a time. Once that limit is reached, it keeps only the most recent 1000. If you need to retain more than that, flush the metrics periodically before you exceed the buffer. @@ -10,7 +10,7 @@ To emit a counter, do the following: ```php // Record five total button clicks -\Sentry\trace_metrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']); +\Sentry\traceMetrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']); ``` ## Emit a Distribution @@ -23,7 +23,7 @@ To emit a distribution, do the following: use \Sentry\Metrics\Unit; // Add '15.0' to a distribution used for tracking the loading times per page. -\Sentry\trace_metrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); +\Sentry\traceMetrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); ``` ## Emit a Gauge @@ -36,7 +36,7 @@ To emit a gauge, do the following: use \Sentry\Metrics\Unit; // Add '15.0' to a gauge used for tracking the loading times per page. -\Sentry\trace_metrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); +\Sentry\traceMetrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); ``` ## Flush @@ -46,5 +46,5 @@ Metrics are flushed and sent to Sentry at the end of each request or command. If you emit more than 1000 metrics per request or command, make sure to manually flush to prevent losing metrics. ```php -\Sentry\trace_metrics()->flush(); +\Sentry\traceMetrics()->flush(); ``` diff --git a/platform-includes/metrics/usage/php.mdx b/platform-includes/metrics/usage/php.mdx index 5c461c42e920a..a8452bfa9e423 100644 --- a/platform-includes/metrics/usage/php.mdx +++ b/platform-includes/metrics/usage/php.mdx @@ -1,4 +1,4 @@ -Metrics are enabled by default in the PHP SDK. After the SDK is initialized, you can send metric data through `\Sentry\trace_metrics()`, which acts as the entry point for recording counts, gauges, and distributions. +Metrics are enabled by default in the PHP SDK. After the SDK is initialized, you can send metric data through `\Sentry\traceMetrics()`, which acts as the entry point for recording counts, gauges, and distributions. The SDK buffers up to 1000 metric entries at a time. Once that limit is reached, it keeps only the most recent 1000. If you need to retain more than that, flush the metrics periodically before you exceed the buffer. @@ -10,7 +10,7 @@ To emit a counter, do the following: ```php // Record five total button clicks -\Sentry\trace_metrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']); +\Sentry\traceMetrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']); ``` ## Emit a Distribution @@ -23,7 +23,7 @@ To emit a distribution, do the following: use \Sentry\Metrics\Unit; // Add '15.0' to a distribution used for tracking the loading times per page. -\Sentry\trace_metrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); +\Sentry\traceMetrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); ``` ## Emit a Gauge @@ -36,7 +36,7 @@ To emit a gauge, do the following: use \Sentry\Metrics\Unit; // Add '15.0' to a gauge used for tracking the loading times per page. -\Sentry\trace_metrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); +\Sentry\traceMetrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); ``` ## Flush @@ -44,5 +44,5 @@ use \Sentry\Metrics\Unit; Make sure to flush collected metrics at the end. ```php -\Sentry\trace_metrics()->flush(); +\Sentry\traceMetrics()->flush(); ``` diff --git a/platform-includes/metrics/usage/php.symfony.mdx b/platform-includes/metrics/usage/php.symfony.mdx index 75887f86544fc..47a25c496908c 100644 --- a/platform-includes/metrics/usage/php.symfony.mdx +++ b/platform-includes/metrics/usage/php.symfony.mdx @@ -1,4 +1,4 @@ -Metrics are enabled by default in the Symfony SDK. After the SDK is initialized, you can send metric data through `\Sentry\trace_metrics()`, which acts as the entry point for recording counts, gauges, and distributions. +Metrics are enabled by default in the Symfony SDK. After the SDK is initialized, you can send metric data through `\Sentry\traceMetrics()`, which acts as the entry point for recording counts, gauges, and distributions. The SDK buffers up to 1000 metric entries at a time. Once that limit is reached, it keeps only the most recent 1000. If you need to retain more than that, flush the metrics periodically before you exceed the buffer. @@ -10,7 +10,7 @@ To emit a counter, do the following: ```php // Record five total button clicks -\Sentry\trace_metrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']); +\Sentry\traceMetrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']); ``` ## Emit a Distribution @@ -23,7 +23,7 @@ To emit a distribution, do the following: use \Sentry\Metrics\Unit; // Add '15.0' to a distribution used for tracking the loading times per page. -\Sentry\trace_metrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); +\Sentry\traceMetrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); ``` ## Emit a Gauge @@ -36,7 +36,7 @@ To emit a gauge, do the following: use \Sentry\Metrics\Unit; // Add '15.0' to a gauge used for tracking the loading times per page. -\Sentry\trace_metrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); +\Sentry\traceMetrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond()); ``` ## Flush @@ -46,5 +46,5 @@ Metrics are flushed and sent to Sentry at the end of each request or command. If you emit more than 1000 metrics per request or command, make sure to manually flush to prevent losing metrics. ```php -\Sentry\trace_metrics()->flush(); +\Sentry\traceMetrics()->flush(); ```