Skip to content

Commit 0234fb6

Browse files
committed
Support changing the tideways collect mode and sample rate
1 parent 4dff1fb commit 0234fb6

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

php/apache/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ TIDEWAYS_FRAMEWORK | What framework (if any) is being used in the image? | strin
140140
TIDEWAYS_API_KEY | Your Tideways API key | string | empty
141141
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
142142
TIDEWAYS_SERVICE | The service that your application provides (optional) | string | empty
143+
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
144+
TIDEWAYS_SAMPLE_RATE | The sample rate for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | integer | 25
143145
XDEBUG_REMOTE_ENABLED | If XDebug is enabled for debugging purposes. We recommend disabling Tideways and only using XDebug in development. | true/false | false
144146
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
145147
XDEBUG_REMOTE_PORT | The port to connect to. | 1-65535 | 9000

php/nginx/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ TIDEWAYS_FRAMEWORK | What framework (if any) is being used in the image? | strin
168168
TIDEWAYS_API_KEY | Your Tideways API key | string | empty
169169
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
170170
TIDEWAYS_SERVICE | The service that your application provides (optional) | string | empty
171+
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
172+
TIDEWAYS_SAMPLE_RATE | The sample rate for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | integer | 25
171173
XDEBUG_REMOTE_ENABLED | If XDebug is enabled for debugging purposes. We recommend disabling Tideways and only using XDebug in development. | true/false | false
172174
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
173175
XDEBUG_REMOTE_PORT | The port to connect to. | 1-65535 | 9000

php/shared/etc/confd/templates/tideways/tideways.ini.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ tideways.connection = {{ getenv "TIDEWAYS_CONNECTION" }}
1313

1414
; Configure the profiling sample rate for this PHP server globally. The given
1515
; number is an integer representing percent between 0 and 100
16-
tideways.sample_rate=25
16+
tideways.sample_rate={{getenv "TIDEWAYS_SAMPLE_RATE"}}
17+
18+
{{if getenv "TIDEWAYS_COLLECT"}}
19+
tideways.collect={{getenv "TIDEWAYS_COLLECT"}}
20+
{{end}}
1721

1822
; Automatically detect transactions and exceptions of a given framework The
1923
; following frameworks are currently supported:

php/shared/usr/local/share/env/40-stack

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export TIDEWAYS_FRAMEWORK=${TIDEWAYS_FRAMEWORK:-}
3333
export TIDEWAYS_API_KEY=${TIDEWAYS_API_KEY:-}
3434
export TIDEWAYS_CONNECTION=${TIDEWAYS_CONNECTION:-tcp://tideways:9135}
3535
export TIDEWAYS_SERVICE=${TIDEWAYS_SERVICE:-}
36+
export TIDEWAYS_SAMPLE_RATE=${TIDEWAYS_SAMPLE_RATE:-25}
37+
export TIDEWAYS_COLLECT=${TIDEWAYS_COLLECT:-TRACING}
3638

3739
XDEBUG_REMOTE_ENABLED="$(convert_to_boolean_string "${XDEBUG_REMOTE_ENABLED:-false}")"
3840
export XDEBUG_REMOTE_ENABLED

0 commit comments

Comments
 (0)