Skip to content

Commit ff8d4d0

Browse files
authored
Merge pull request #459 from continuouspipe/feature/support-changing-the-tideways-collect-mode
Support changing the tideways collect mode and sample rate
2 parents 36855a3 + 0234fb6 commit ff8d4d0

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
@@ -171,6 +171,8 @@ TIDEWAYS_FRAMEWORK | What framework (if any) is being used in the image? | strin
171171
TIDEWAYS_API_KEY | Your Tideways API key | string | empty
172172
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
173173
TIDEWAYS_SERVICE | The service that your application provides (optional) | string | empty
174+
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
175+
TIDEWAYS_SAMPLE_RATE | The sample rate for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | integer | 25
174176
XDEBUG_REMOTE_ENABLED | If XDebug is enabled for debugging purposes. We recommend disabling Tideways and only using XDebug in development. | true/false | false
175177
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
176178
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
@@ -184,6 +184,8 @@ TIDEWAYS_FRAMEWORK | What framework (if any) is being used in the image? | strin
184184
TIDEWAYS_API_KEY | Your Tideways API key | string | empty
185185
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
186186
TIDEWAYS_SERVICE | The service that your application provides (optional) | string | empty
187+
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
188+
TIDEWAYS_SAMPLE_RATE | The sample rate for Tideways (see [the Tideways documentation](https://tideways.io/profiler/article/43-sampling))(optional) | integer | 25
187189
XDEBUG_REMOTE_ENABLED | If XDebug is enabled for debugging purposes. We recommend disabling Tideways and only using XDebug in development. | true/false | false
188190
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
189191
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)