diff --git a/php/apache/README.md b/php/apache/README.md index 921ee8d6..eaf06d96 100644 --- a/php/apache/README.md +++ b/php/apache/README.md @@ -140,6 +140,8 @@ TIDEWAYS_FRAMEWORK | What framework (if any) is being used in the image? | strin TIDEWAYS_API_KEY | Your Tideways API key | string | empty TIDEWAYS_CONNECTION | The location of a Tideways daemon to send logs/instrumentation to. We recommend deploying https://github.com/continuouspipe/dockerfiles/tree/master/tideways to handle this | protocol://domain_or_ip:port | tcp://tideways:9135 TIDEWAYS_SERVICE | The service that your application provides (optional) | string | empty +TIDEWAYS_COLLECT | The collect mode for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | DISABLED/BASIC/TRACING/PROFILING/FULL | TRACING +TIDEWAYS_SAMPLE_RATE | The sample rate for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | integer | 25 XDEBUG_REMOTE_ENABLED | If XDebug is enabled for debugging purposes. We recommend disabling Tideways and only using XDebug in development. | true/false | false XDEBUG_REMOTE_HOST | The host to connect to. We recommend deploying https://github.com/continuouspipe/dockerfiles/tree/master/ssh-forward to handle this | A domain or IP address | sshforward XDEBUG_REMOTE_PORT | The port to connect to. | 1-65535 | 9000 diff --git a/php/nginx/README.md b/php/nginx/README.md index 693733b3..6cabef9f 100644 --- a/php/nginx/README.md +++ b/php/nginx/README.md @@ -168,6 +168,8 @@ TIDEWAYS_FRAMEWORK | What framework (if any) is being used in the image? | strin TIDEWAYS_API_KEY | Your Tideways API key | string | empty TIDEWAYS_CONNECTION | The location of a Tideways daemon to send logs/instrumentation to. We recommend deploying https://github.com/continuouspipe/dockerfiles/tree/master/tideways to handle this | protocol://domain_or_ip:port | tcp://tideways:9135 TIDEWAYS_SERVICE | The service that your application provides (optional) | string | empty +TIDEWAYS_COLLECT | The collect mode for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | DISABLED/BASIC/TRACING/PROFILING/FULL | TRACING +TIDEWAYS_SAMPLE_RATE | The sample rate for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | integer | 25 XDEBUG_REMOTE_ENABLED | If XDebug is enabled for debugging purposes. We recommend disabling Tideways and only using XDebug in development. | true/false | false XDEBUG_REMOTE_HOST | The host to connect to. We recommend deploying https://github.com/continuouspipe/dockerfiles/tree/master/ssh-forward to handle this | A domain or IP address | sshforward XDEBUG_REMOTE_PORT | The port to connect to. | 1-65535 | 9000 diff --git a/php/shared/etc/confd/templates/tideways/tideways.ini.tmpl b/php/shared/etc/confd/templates/tideways/tideways.ini.tmpl index f8cda918..05eff68c 100644 --- a/php/shared/etc/confd/templates/tideways/tideways.ini.tmpl +++ b/php/shared/etc/confd/templates/tideways/tideways.ini.tmpl @@ -13,7 +13,11 @@ tideways.connection = {{ getenv "TIDEWAYS_CONNECTION" }} ; Configure the profiling sample rate for this PHP server globally. The given ; number is an integer representing percent between 0 and 100 -tideways.sample_rate=25 +tideways.sample_rate={{getenv "TIDEWAYS_SAMPLE_RATE"}} + +{{if getenv "TIDEWAYS_COLLECT"}} +tideways.collect={{getenv "TIDEWAYS_COLLECT"}} +{{end}} ; Automatically detect transactions and exceptions of a given framework The ; following frameworks are currently supported: diff --git a/php/shared/usr/local/share/env/40-stack b/php/shared/usr/local/share/env/40-stack index 586abc97..7bc2fe39 100644 --- a/php/shared/usr/local/share/env/40-stack +++ b/php/shared/usr/local/share/env/40-stack @@ -33,6 +33,8 @@ export TIDEWAYS_FRAMEWORK=${TIDEWAYS_FRAMEWORK:-} export TIDEWAYS_API_KEY=${TIDEWAYS_API_KEY:-} export TIDEWAYS_CONNECTION=${TIDEWAYS_CONNECTION:-tcp://tideways:9135} export TIDEWAYS_SERVICE=${TIDEWAYS_SERVICE:-} +export TIDEWAYS_SAMPLE_RATE=${TIDEWAYS_SAMPLE_RATE:-25} +export TIDEWAYS_COLLECT=${TIDEWAYS_COLLECT:-TRACING} XDEBUG_REMOTE_ENABLED="$(convert_to_boolean_string "${XDEBUG_REMOTE_ENABLED:-false}")" export XDEBUG_REMOTE_ENABLED