> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Continuous profiling for PHP

> Configure and use the PHP continuous profiler.

export const ContinuousProfilingSellableBody = () => <Info title="Feature availability">
    By default, Upsun offers 15 minutes of continuous profiling per project and for free.
    To get 30 days of continuous profiling per project and for a fixed fee, <a href="/docs/administration/billing/add-on-subscription#continuous-profiling-add-on">upgrade to the Continuous Profiling add-on</a>.
  </Info>;

<ContinuousProfilingSellableBody />

Upsun [Continuous Profiler](/docs/observability/application-metrics/cont-prof) is powered by [Blackfire](/docs/observability/application-metrics/blackfire).
It is available directly in the [Console](/docs/administration/web), under **Apps and Services → your app → Profiling**.

The PHP continuous profiling is currently made across 4 dimensions:

* **CPU Time**:  Time spent running on the CPU
* **Wall-time**: Elapsed time per function call
* **Allocated Memory**: Number of bytes allocated in memory
* **Allocations**: Time spent running on the CPU

The default sampling frequency is 100 Hz. This means the PHP continuous profiler is
collecting information 100 times per second.

## Prerequisites

Upsun Continuous Profiler requires [`PHP >=8.2`](/docs/languages/php).

## Installation

The Blackfire Continuous Profiler PHP library is included by default in all
PHP images matching its requirements. There is no installation required.

## Configuration

The PHP continuous profiler is enabled by default without configuration.

Optionally, you can override the following environment variables:

* `DD_PROFILING_ENABLED=true`: forces the PHP continuous profiler activation/deactivation
* `DD_PROFILING_LOG_LEVEL=off`: controls the PHP continuous profiler log level
