# Upsun

A full access to Blackfire is bundled with your PHP and Python Upsun projects.

Blackfire has built-in support for [Upsun](https://upsun.com)projects. The integration is made simpler as Blackfire agent and probe are installed and enabled by default on all Upsun projects.

Blackfire **server credentials** are automatically configured on all PHP and Python Upsun projects. The Blackfire integration appears in the project settings in Upsun [console](https://docs.upsun.com/administration/web.html).

## Monitoring

Blackfire monitoring is enabled by default on your production environment.

To enable Blackfire monitoring on your development or staging environments, go to your organization menu and click [Organization Monitoring Usage](../../monitoring-cookbooks/monitoring-usage#monitoring-activation)

## CLI Profiling

HTTP requests can be profiled without any extra configuration, but the **client credentials** are required to [trigger profiles with the CLI](../../profiling-cookbooks/profiling-http-via-cli) from your Upsun environments.

Set the **client credentials** as environment variables (run this command from the root directory of your project):

> **Warning**
>
> Recommended: To explicitly define which [environment](../../reference-guide/environments) the profile must be sent to, use the `--env=<ENV_UUID>` parameter.
>
> Blackfire Agent uses the `BLACKFIRE_SERVER_ID` environment variable to determine where to send the profile.
>
> When no target environment is specified or implicitly discovered, the profile is sent to the personal sandbox environment of the user whose [personal credentials](../../up-and-running/configuration/cli#cli-client-env-vars) (`BLACKFIRE_CLIENT_ID`and `BLACKFIRE_CLIENT_TOKEN`) were used. Only that user can then access the profile from [/my/profiles](../../my/profiles).
>
> To explicitly specify your personal sandbox environment, use `--env="My Environment"`

## Develop on GitHub, Deploy to Upsun and Test on Blackfire

Here is a full video tutorial to get you started with the integration of the three services:

[upsun-integration-tutorial](https://www.youtube-nocookie.com/embed/-5icUW9pUH8?rel=0&showinfo=0&modestbranding=1&autoplay=0)
