Skip to content

Commit 626d1db

Browse files
committed
tbs -> tail sampling
1 parent 1d6a2a3 commit 626d1db

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

.github/workflows/benchmarks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
required: false
99
type: boolean
1010
default: false
11-
enableTBS:
11+
enableTailSampling:
1212
description: 'Enable tail-based sampling on the APM server'
1313
required: false
1414
type: boolean
@@ -57,7 +57,7 @@ jobs:
5757
TF_VAR_private_key: ./id_rsa_terraform
5858
TF_VAR_public_key: ./id_rsa_terraform.pub
5959
TF_VAR_run_standalone: ${{ inputs.runStandalone || github.event.schedule=='0 5 */5 * *' }}
60-
TF_VAR_apm_server_tbs: ${{ inputs.enableTBS }}
60+
TF_VAR_apm_server_tail_sampling: ${{ inputs.enableTailSampling }}
6161
RUN_STANDALONE: ${{ inputs.runStandalone || github.event.schedule=='0 5 */5 * *' }}
6262
TFVARS_SOURCE: ${{ inputs.profile || 'system-profiles/8GBx1zone.tfvars' }} # // Default to use an 8gb profile
6363
TF_VAR_BUILD_ID: ${{ github.run_id }}

testing/benchmark/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module "ec_deployment" {
103103
drop_pipeline = var.drop_pipeline
104104
apm_server_expvar = true
105105
apm_server_pprof = true
106-
apm_server_tbs = var.apm_server_tbs
106+
apm_server_tail_sampling = var.apm_server_tail_sampling
107107

108108
elasticsearch_size = var.elasticsearch_size
109109
elasticsearch_zone_count = var.elasticsearch_zone_count

testing/benchmark/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ variable "drop_pipeline" {
9292
type = bool
9393
}
9494

95-
variable "apm_server_tbs" {
95+
variable "apm_server_tail_sampling" {
9696
default = false
9797
description = "Whether or not to enable APM Server tail-based sampling. Defaults to false"
9898
type = bool

testing/infra/terraform/modules/ec_deployment/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ used to configure the module, please refer to the [EC Provider docs](https://reg
4747
| <a name="input_apm_server_expvar"></a> [apm\_server\_expvar](#input\_apm\_server\_expvar) | Whether or not to enable APM Server's expvar endpoint. Defaults to false | `bool` | `false` | no |
4848
| <a name="input_apm_server_pprof"></a> [apm\_server\_pprof](#input\_apm\_server\_pprof) | Whether or not to enable APM Server's pprof endpoint. Defaults to false | `bool` | `false` | no |
4949
| <a name="input_apm_server_size"></a> [apm\_server\_size](#input\_apm\_server\_size) | Optional apm server instance size | `string` | `"1g"` | no |
50-
| <a name="input_apm_server_tbs"></a> [apm\_server\_tbs](#input\_apm\_server\_tbs) | Whether or not to enable APM Server tail-based sampling. Defaults to false | `bool` | `false` | no |
50+
| <a name="input_apm_server_tail_sampling"></a> [apm\_server\_tbs](#input\_apm\_server\_tbs) | Whether or not to enable APM Server tail-based sampling. Defaults to false | `bool` | `false` | no |
5151
| <a name="input_apm_server_zone_count"></a> [apm\_server\_zone\_count](#input\_apm\_server\_zone\_count) | Optional apm server zone count | `number` | `1` | no |
5252
| <a name="input_custom_apm_integration_pkg_path"></a> [custom\_apm\_integration\_pkg\_path](#input\_custom\_apm\_integration\_pkg\_path) | Path to the zipped custom APM integration package, if empty custom apm integration pkg is not installed | `string` | `""` | no |
5353
| <a name="input_deployment_name_prefix"></a> [deployment\_name\_prefix](#input\_deployment\_name\_prefix) | Optional ESS or ECE region. Defaults to GCP US West 2 (Los Angeles) | `string` | `"apmserver"` | no |

testing/infra/terraform/modules/ec_deployment/deployment.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ resource "local_file" "enable_features" {
119119
elastic_password = ec_deployment.deployment.elasticsearch_password,
120120
enable_expvar = var.apm_server_expvar
121121
enable_pprof = var.apm_server_pprof
122-
enable_tbs = var.apm_server_tbs
122+
enable_tail_sampling = var.apm_server_tail_sampling
123123
})
124124
filename = "${path.module}/scripts/enable_features.sh"
125125
}

testing/infra/terraform/modules/ec_deployment/scripts/enable_features.tftpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
# Abort early if features are already set as desired
1818
echo $${POLICY} | jq -e '.item | select(.inputs[].policy_template == "apmserver").inputs[].vars.expvar_enabled.value == ${enable_expvar}' &&
1919
echo $${POLICY} | jq -e '.item | select(.inputs[].policy_template == "apmserver").inputs[].vars.pprof_enabled.value == ${enable_pprof}' &&
20-
echo $${POLICY} | jq -e '.item | select(.inputs[].policy_template == "apmserver").inputs[].vars.tail_sampling_enabled.value == ${enable_tbs}' &&
20+
echo $${POLICY} | jq -e '.item | select(.inputs[].policy_template == "apmserver").inputs[].vars.tail_sampling_enabled.value == ${enable_tail_sampling}' &&
2121
echo "Features already set as desired" && exit 0
2222

2323
# Download and modify the APM policy
@@ -27,7 +27,7 @@ echo $${POLICY} | jq '.item' | \
2727
jq 'select(.inputs[].policy_template == "apmserver").inputs[].vars.expvar_enabled = {type: "bool", value: ${enable_expvar}}' |\
2828
jq 'select(.inputs[].policy_template == "apmserver").inputs[].vars.pprof_enabled = {type: "bool", value: ${enable_pprof}}' |\
2929
jq 'select(.inputs[].policy_template == "apmserver").inputs[].vars.tail_sampling_storage_limit = {"value":"10GB","type":"text"}' |\ # set TBS storage limit to 10GB by default
30-
jq 'select(.inputs[].policy_template == "apmserver").inputs[].vars.tail_sampling_enabled = {type: "bool", value: ${enable_tbs}}' > policy.json
30+
jq 'select(.inputs[].policy_template == "apmserver").inputs[].vars.tail_sampling_enabled = {type: "bool", value: ${enable_tail_sampling}}' > policy.json
3131

3232
# Update the policy
3333
curl -s -H 'content-type: application/json' -H 'kbn-xsrf: true' -X PUT -k [email protected] -u $${KIBANA_AUTH} $${KIBANA_ENDPOINT}

testing/infra/terraform/modules/ec_deployment/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ variable "apm_server_pprof" {
122122
type = bool
123123
}
124124

125-
variable "apm_server_tbs" {
125+
variable "apm_server_tail_sampling" {
126126
default = false
127127
description = "Whether or not to enable APM Server tail-based sampling. Defaults to false"
128128
type = bool

0 commit comments

Comments
 (0)