Skip to content

OpenForgeProject/ddev-tideways

Repository files navigation

add-on registry tests last commit release

DDEV Tideways

Integrates the Tideways PHP profiler into a DDEV project. It installs the Tideways PHP extension and CLI into the web container, runs the Tideways daemon as a service, and configures everything through environment variables.

Installation

ddev add-on get OpenForgeProject/ddev-tideways
ddev dotenv set .ddev/.env.tideways --tideways-apikey=YOUR_API_KEY
ddev restart

Find your API key in your Tideways project settings. The key is stored in .ddev/.env.tideways — commit or git-ignore that file per your team's policy.

Configuration

Change any value with ddev dotenv set .ddev/.env.tideways --<flag>=<value> followed by ddev restart:

Variable Flag Default
TIDEWAYS_APIKEY --tideways-apikey (empty)
TIDEWAYS_ENVIRONMENT --tideways-environment ddev
TIDEWAYS_SERVICE --tideways-service app
TIDEWAYS_TRACE_SAMPLE_RATE --tideways-trace-sample-rate 100
TIDEWAYS_CLI_TOKEN --tideways-cli-token (empty)
TIDEWAYS_DAEMON_DOCKER_IMAGE --tideways-daemon-docker-image ghcr.io/tideways/daemon:latest

TIDEWAYS_CONNECTION is fixed to tcp://tideways-daemon:9135.

Usage

ddev tideways-doctor status   # extension, CLI, daemon and configuration
ddev tideways-doctor test     # generate traffic and confirm data is collected
ddev tideways-doctor logs -f  # follow the daemon logs

ddev tideways … passes through to the Tideways CLI for profiling console scripts. Import your CLI settings once (token from https://app.tideways.io/user/cli-import-settings), then trace a command:

ddev tideways import <token>                       # re-run after a web image rebuild
ddev tideways run [project] php bin/magento cron:run

No data in the dashboard?

Tideways silently discards data when the target does not exist within your account limits:

  • EnvironmentTIDEWAYS_ENVIRONMENT must be an environment that exists in your project.
  • Service — a service beyond your plan's service limit is discarded; app is Tideways' default service, so keep it unless you have a free service slot.

Removal

ddev add-on remove tideways

Credits

Contributed and maintained by @OpenForgeProject