Skip to content

Commit 7ff7719

Browse files
committed
feat: add OTEL_COLLECTOR_URL
1 parent 05b7c52 commit 7ff7719

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.github/workflows/deploy-aztec-infra.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ on:
100100
description: Whether to use an external ingress for the rpc
101101
required: true
102102
type: boolean
103+
otel_collector_url:
104+
description: The OpenTelemetry collector that will receive metrics from this deployment. Optional
105+
required: false
106+
type: string
103107
secrets:
104108
GCP_SA_KEY:
105109
description: The GCP service account key
@@ -207,6 +211,10 @@ on:
207211
description: Whether to use an external ingress for the rpc
208212
required: true
209213
type: boolean
214+
otel_collector_url:
215+
description: The OpenTelemetry collector that will receive metrics from this deployment. Optional
216+
required: false
217+
type: string
210218

211219
jobs:
212220
deploy_aztec_infra:
@@ -237,6 +245,7 @@ jobs:
237245
TF_VAR_PROVER_RESOURCE_PROFILE: ${{ inputs.prover_resource_profile }}
238246
TF_VAR_RPC_RESOURCE_PROFILE: ${{ inputs.rpc_resource_profile }}
239247
TF_VAR_RPC_EXTERNAL_INGRESS: ${{ inputs.rpc_external_ingress }}
248+
TF_VAR_OTEL_COLLECTOR_URL: ${{ inputs.otel_collector_url }}
240249

241250
steps:
242251
- name: Debug inputs

spartan/terraform/deploy-aztec-infra/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ locals {
5858
"global.customAztecNetwork.slashFactoryContractAddress" = var.SLASH_FACTORY_CONTRACT_ADDRESS
5959
"global.customAztecNetwork.feeAssetHandlerContractAddress" = var.FEE_ASSET_HANDLER_CONTRACT_ADDRESS
6060
"global.customAztecNetwork.l1ChainId" = var.L1_CHAIN_ID
61+
"global.otelCollectorEndpoint" = var.OTEL_COLLECTOR_URL
6162
}
6263

6364
common_list_settings = {

spartan/terraform/deploy-aztec-infra/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ variable "AZTEC_DOCKER_IMAGE" {
7979
default = "aztecprotocol/aztec:staging"
8080
}
8181

82-
variable "METRICS_NAMESPACE" {
83-
description = "Namespace to deploy the metrics to"
82+
variable "OTEL_COLLECTOR_BASE_URL" {
83+
description = "Base URL of an OpenTelemtry collector to send metrics to"
8484
type = string
85-
default = "metrics"
85+
nullable = true
8686
}
8787

8888
variable "VALIDATOR_VALUES" {

spartan/terraform/deploy-metrics/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ output "otel_collector_ip" {
99
value = google_compute_address.otel_collector_ip.address
1010
}
1111

12+
output "otel_collector_base_url" {
13+
description = "OTEL Collector IP"
14+
value = "http://${google_compute_address.otel_collector_ip.address}:4318"
15+
}
16+

0 commit comments

Comments
 (0)