Collecting for multiple environments on one server
For technical reasons each tideways-daemon can handle exactly one environment. This means if you have a project runs with multiple environments on one server, this is not possible with the default setup of the tideways-daemon.
You can start the daemon multiple times on one server to get support for multiple environments.
-
Start the daemon for a second (or third time, …) for each additional environment on the server.
tideways-daemon --hostname="$HOSTNAME-staging" --env=staging --address=/var/run/tideways/tidewaysd-staging.sock --log=/var/log/tideways/daemon-staging.log
You should wrap this in a service, for example by copying the systemd service unit file to create a new "tideways-daemon-staging" unit that you can use to control the process and restart it after reboots.
-
Then in php.ini for the project running in staging environment you can do:
tideways.connection=unix:///var/run/tideways/tidewaysd-staging.sock
or setting the environment variable via Nginx vhost (via PHP-fpm pool or Apache is also possible through their APIs).
TIDEWAYS_CONNECTION=unix:///var/run/tideways/tidewaysd-staging.sock