Install on Digitalocean App Platform

With App Platform, Digitalocean now provides a modern Platform-as-a-Service (PaaS) offering that is comparable to Heroku and supports deployment of PHP applications by immediately deploying changes pushed to Git, GitHub or GitLab repositories.

If you do not have a Digitalocean account yet, you can signup here and receive $ 100 in credits for 60 days.

Integrating Tideways with Digitalocean is done through their use of Cloud Native buildpacks in the deployment process. By using the Heroku PHP Buildpack with your Digitalocean application Tideways is automatically supported with a few tweaks.

Follow the PHP Dev Guide and Sample Apps on Digitalocean documentation to get a PHP application running.

Add Package Repository to Environment Variables

To make the tideways package available in a DO app, open up the "Settings" tab from the the web UI of the app:

The Settings menu

Click "Edit" next to the Environment Variables section and add a new environment variable HEROKU_PHP_PLATFORM_REPOSITORIES with the value https://tideways.s3.amazonaws.com/heroku/ and save.

Add ext-tideways to composer.json

Next, you need to make ext-tideways a requirement of your application so that the PHP buildpack installs it during a deployment.

Modify your composer.json to include a new ext-tideways package in the require section and also add config.platform.ext-tideways so that installation is possible locally even when the extension is not available.

{
    "require": {
        "php": "7.0.*",
        "ext-tideways": "@stable"
    },
    "config": {
        "platform": {
            "ext-tideways": "1.0.0"
        }
    }
}

Re-run Composer to generate the changes to a new lock file:

composer update ext-tideways --ignore-platform-reqs

Commit the changes and push your application to re-deploy

Configure API Key and Sample Rate

Next you need to configure the Tideways API-Key and optionally a sample rate via Environment variables. Similar as before when setting HEROKU_PHP_PLATFORM_REPOSITORIES open the Environment settings and add TIDEWAYS_APIKEY and TIDEWAYS_SAMPLERATE as depicated in this screenshot:

Environment variables

Saving will redeploy the application and Tideways should start collecting data immediately.

Configuration Tideways via php.ini (Optional)

If you want to set additional php.ini values to configure Tideways, you can do so by creating or modifying the file .user.ini in the public / document root directory, for example:

tideways.dynamic_tracepoints.enable_web=1
tideways.dynamic_tracepoints.enable_cli=1
Still need help? Email [email protected]