Skip to content

Commit dd593bd

Browse files
authored
trace_fraction (#368)
1 parent e37f5a4 commit dd593bd

6 files changed

Lines changed: 15 additions & 2 deletions

File tree

deployment/live/gcp/static-ct-staging/logs/arche2025h1/terragrunt.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ locals {
1111
not_after_limit = "2025-07-01T00:00:00Z"
1212
server_docker_image = "${include.root.locals.location}-docker.pkg.dev/${include.root.locals.project_id}/docker-${local.env}/tesseract-gcp:${include.root.locals.docker_container_tag}"
1313
spanner_pu = 500
14+
trace_fraction = 0.1
1415
}
1516

1617
include "root" {

deployment/live/gcp/static-ct-staging/logs/arche2025h2/terragrunt.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ locals {
1111
not_after_limit = "2026-01-01T00:00:00Z"
1212
server_docker_image = "${include.root.locals.location}-docker.pkg.dev/${include.root.locals.project_id}/docker-${local.env}/tesseract-gcp:${include.root.locals.docker_container_tag}"
1313
spanner_pu = 500
14+
trace_fraction = 0.1
1415
}
1516

1617
include "root" {

deployment/modules/gcp/cloudrun/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ resource "google_cloud_run_v2_service" "default" {
5252
"--inmemory_antispam_cache_size=25000000", # About 1GB of memory.
5353
"--not_after_start=${var.not_after_start}",
5454
"--not_after_limit=${var.not_after_limit}",
55+
"--trace_fraction=${var.trace_fraction}"
5556
]
5657
ports {
5758
container_port = 6962

deployment/modules/gcp/cloudrun/variables.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,15 @@ variable "signer_private_key_secret_name" {
6060

6161
variable "not_after_start" {
6262
description = "Start of the range of acceptable NotAfter values, inclusive. Leaving this empty implies no lower bound to the range. RFC3339 UTC format, e.g: 2024-01-02T15:04:05Z."
63-
default = ""
6463
type = string
6564
}
6665

6766
variable "not_after_limit" {
6867
description = "Cut off point of notAfter dates - only notAfter dates strictly *before* notAfterLimit will be accepted. Leaving this empty means no upper bound on the accepted range. RFC3339 UTC format, e.g: 2024-01-02T15:04:05Z."
69-
default = ""
7068
type = string
7169
}
70+
71+
variable "trace_fraction" {
72+
description = "Fraction of open-telemetry span traces to sample."
73+
type = number
74+
}

deployment/modules/gcp/tesseract/cloudrun/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module "cloudrun" {
3535
antispam_spanner_db = module.storage.antispam_spanner_db.name
3636
signer_public_key_secret_name = module.secretmanager.ecdsa_p256_public_key_id
3737
signer_private_key_secret_name = module.secretmanager.ecdsa_p256_private_key_id
38+
trace_fraction = var.trace_fraction
3839

3940
depends_on = [
4041
module.secretmanager,

deployment/modules/gcp/tesseract/cloudrun/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,9 @@ variable "ephemeral" {
5656
default = false
5757
type = bool
5858
}
59+
60+
variable "trace_fraction" {
61+
description = "Fraction of open-telemetry span traces to sample."
62+
default = 0
63+
type = number
64+
}

0 commit comments

Comments
 (0)