Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions iac/modules/job-otel-collector/configs/otel-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ exporters:
name: "metrics_gauge"
sum:
name: "metrics_sum"
%{ if enable_otel_router_metrics }
otlp/otel_router:
endpoint: 127.0.0.1:${otel_router_grpc_port}
Comment thread
wj-e2b marked this conversation as resolved.
tls:
insecure: true
%{ endif }
service:
telemetry:
logs:
Expand Down Expand Up @@ -524,6 +530,16 @@ service:
- batch/clickhouse
exporters:
- clickhouse
%{ if enable_otel_router_metrics }
metrics/external/otel_router:
receivers:
- otlp
processors:
- filter/external_metrics
- batch
exporters:
- otlp/otel_router
Comment thread
wj-e2b marked this conversation as resolved.
%{ endif }
Comment thread
wj-e2b marked this conversation as resolved.
traces:
receivers:
- otlp
Expand Down
15 changes: 15 additions & 0 deletions iac/modules/job-otel-collector/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ locals {
clickhouse_port = var.clickhouse_port
clickhouse_host = var.clickhouse_host
clickhouse_database = var.clickhouse_database

enable_otel_router_metrics = var.enable_otel_router_metrics
otel_router_grpc_port = var.otel_router_grpc_port
},
)

Expand Down Expand Up @@ -101,6 +104,18 @@ variable "clickhouse_database" {
default = ""
}

variable "enable_otel_router_metrics" {
type = bool
default = false
description = "Enable teeing external customer metrics from otel-collector to otel-router."
}

variable "otel_router_grpc_port" {
type = number
default = 4320
description = "Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
}

variable "otel_collector_config_override" {
type = string
default = ""
Expand Down
2 changes: 2 additions & 0 deletions iac/provider-aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ tf_vars := AWS_PROFILE=$(AWS_PROFILE) AWS_REGION=$(AWS_REGION) \
$(call tfvar, AWS_REGION) \
$(call tfvar, ENABLE_OTEL_ROUTER_LOGS) \
$(call tfvar, OTEL_ROUTER_HTTP_PORT) \
$(call tfvar, ENABLE_OTEL_ROUTER_METRICS) \
$(call tfvar, OTEL_ROUTER_GRPC_PORT) \
Comment thread
wj-e2b marked this conversation as resolved.
$(call tfvar, DB_MAX_OPEN_CONNECTIONS) \
$(call tfvar, DB_MIN_IDLE_CONNECTIONS) \
$(call tfvar, AUTH_DB_MAX_OPEN_CONNECTIONS) \
Expand Down
3 changes: 3 additions & 0 deletions iac/provider-aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ module "nomad" {
enable_otel_router_logs = var.enable_otel_router_logs
otel_router_http_port = var.otel_router_http_port

enable_otel_router_metrics = var.enable_otel_router_metrics
otel_router_grpc_port = var.otel_router_grpc_port
Comment thread
wj-e2b marked this conversation as resolved.

db_max_open_connections = var.db_max_open_connections
db_min_idle_connections = var.db_min_idle_connections
auth_db_max_open_connections = var.auth_db_max_open_connections
Expand Down
3 changes: 3 additions & 0 deletions iac/provider-aws/nomad/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ module "otel_collector" {
grafana_username = var.grafana_username
consul_token = var.consul_acl_token

enable_otel_router_metrics = var.enable_otel_router_metrics
otel_router_grpc_port = var.otel_router_grpc_port

clickhouse_username = var.clickhouse_username
clickhouse_password = var.clickhouse_password
clickhouse_port = var.clickhouse_port
Expand Down
12 changes: 12 additions & 0 deletions iac/provider-aws/nomad/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ variable "otel_router_http_port" {
description = "Local otel-router Vector-compatible logs port used by Vector when otel-router log teeing is enabled."
}

variable "enable_otel_router_metrics" {
type = bool
default = false
description = "Enable teeing external customer metrics from otel-collector to otel-router."
}

variable "otel_router_grpc_port" {
type = number
default = 4320
description = "Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
}

# Feature flags
variable "launch_darkly_api_key" {
type = string
Expand Down
12 changes: 12 additions & 0 deletions iac/provider-aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,15 @@ variable "otel_router_http_port" {
default = 4321
description = "Local otel-router Vector-compatible logs port used by Vector when otel-router log teeing is enabled."
}

variable "enable_otel_router_metrics" {
type = bool
default = false
description = "Enable teeing external customer metrics from otel-collector to otel-router."
}

variable "otel_router_grpc_port" {
type = number
default = 4320
description = "Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
}
2 changes: 2 additions & 0 deletions iac/provider-gcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ tf_vars := \
$(call tfvar, OTEL_COLLECTOR_RESOURCES_MEMORY_MB) \
$(call tfvar, ENABLE_OTEL_ROUTER_LOGS) \
$(call tfvar, OTEL_ROUTER_HTTP_PORT) \
$(call tfvar, ENABLE_OTEL_ROUTER_METRICS) \
$(call tfvar, OTEL_ROUTER_GRPC_PORT) \
$(call tfvar, TEMPLATE_BUCKET_NAME) \
$(call tfvar, TEMPLATE_BUCKET_LOCATION) \
$(call tfvar, ENVD_TIMEOUT) \
Expand Down
2 changes: 2 additions & 0 deletions iac/provider-gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ module "nomad" {
otel_collector_resources_cpu_count = var.otel_collector_resources_cpu_count
enable_otel_router_logs = var.enable_otel_router_logs
otel_router_http_port = var.otel_router_http_port
enable_otel_router_metrics = var.enable_otel_router_metrics
otel_router_grpc_port = var.otel_router_grpc_port

# Dashboard API
dashboard_api_count = var.dashboard_api_count
Expand Down
3 changes: 3 additions & 0 deletions iac/provider-gcp/nomad/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ module "otel_collector" {
grafana_username = data.google_secret_manager_secret_version.grafana_username.secret_data
consul_token = var.consul_acl_token_secret

enable_otel_router_metrics = var.enable_otel_router_metrics
otel_router_grpc_port = var.otel_router_grpc_port

clickhouse_username = var.clickhouse_username
clickhouse_password = random_password.clickhouse_password.result
clickhouse_port = var.clickhouse_server_port.port
Expand Down
12 changes: 12 additions & 0 deletions iac/provider-gcp/nomad/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,18 @@ variable "otel_router_http_port" {
description = "Local otel-router Vector-compatible logs port used by Vector when otel-router log teeing is enabled."
}

variable "enable_otel_router_metrics" {
type = bool
default = false
description = "Enable teeing external customer metrics from otel-collector to otel-router."
}

variable "otel_router_grpc_port" {
type = number
default = 4320
description = "Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
}

variable "clickhouse_server_port" {
type = object({
name = string
Expand Down
12 changes: 12 additions & 0 deletions iac/provider-gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,18 @@ variable "otel_router_http_port" {
description = "Local otel-router Vector-compatible logs port used by Vector when otel-router log teeing is enabled."
}

variable "enable_otel_router_metrics" {
type = bool
default = false
description = "Enable teeing external customer metrics from otel-collector to otel-router."
}

variable "otel_router_grpc_port" {
type = number
default = 4320
description = "Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
}

variable "clickhouse_resources_memory_mb" {
type = number
default = 8192
Expand Down
Loading