File tree Expand file tree Collapse file tree
modules/job-otel-collector Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -457,6 +457,12 @@ exporters:
457457 name : " metrics_gauge"
458458 sum :
459459 name : " metrics_sum"
460+ %{ if enable_otel_router_metrics }
461+ otlp/otel_router :
462+ endpoint : 127.0.0.1:${otel_router_grpc_port}
463+ tls :
464+ insecure : true
465+ %{ endif }
460466service :
461467 telemetry :
462468 logs :
@@ -524,6 +530,16 @@ service:
524530 - batch/clickhouse
525531 exporters :
526532 - clickhouse
533+ %{ if enable_otel_router_metrics }
534+ metrics/external/otel_router :
535+ receivers :
536+ - otlp
537+ processors :
538+ - filter/external_metrics
539+ - batch
540+ exporters :
541+ - otlp/otel_router
542+ %{ endif }
527543 traces :
528544 receivers :
529545 - otlp
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ locals {
1212 clickhouse_port = var.clickhouse_port
1313 clickhouse_host = var.clickhouse_host
1414 clickhouse_database = var.clickhouse_database
15+
16+ enable_otel_router_metrics = var.enable_otel_router_metrics
17+ otel_router_grpc_port = var.otel_router_grpc_port
1518 },
1619 )
1720
@@ -101,6 +104,18 @@ variable "clickhouse_database" {
101104 default = " "
102105}
103106
107+ variable "enable_otel_router_metrics" {
108+ type = bool
109+ default = false
110+ description = " Enable teeing external customer metrics from otel-collector to otel-router."
111+ }
112+
113+ variable "otel_router_grpc_port" {
114+ type = number
115+ default = 4320
116+ description = " Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
117+ }
118+
104119variable "otel_collector_config_override" {
105120 type = string
106121 default = " "
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ tf_vars := AWS_PROFILE=$(AWS_PROFILE) AWS_REGION=$(AWS_REGION) \
4343 $(call tfvar, BUILD_SERVER_NESTED_VIRTUALIZATION) \
4444 $(call tfvar, AWS_ACCOUNT_ID) \
4545 $(call tfvar, AWS_REGION) \
46+ $(call tfvar, ENABLE_OTEL_ROUTER_LOGS) \
47+ $(call tfvar, OTEL_ROUTER_HTTP_PORT) \
48+ $(call tfvar, ENABLE_OTEL_ROUTER_METRICS) \
49+ $(call tfvar, OTEL_ROUTER_GRPC_PORT) \
4650 $(call tfvar, DB_MAX_OPEN_CONNECTIONS) \
4751 $(call tfvar, DB_MIN_IDLE_CONNECTIONS) \
4852 $(call tfvar, AUTH_DB_MAX_OPEN_CONNECTIONS) \
Original file line number Diff line number Diff line change @@ -232,6 +232,9 @@ module "nomad" {
232232
233233 enable_otel_router_logs = var. enable_otel_router_logs
234234
235+ enable_otel_router_metrics = var. enable_otel_router_metrics
236+ otel_router_grpc_port = var. otel_router_grpc_port
237+
235238 db_max_open_connections = var. db_max_open_connections
236239 db_min_idle_connections = var. db_min_idle_connections
237240 auth_db_max_open_connections = var. auth_db_max_open_connections
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ module "otel_collector" {
4343 grafana_username = var. grafana_username
4444 consul_token = var. consul_acl_token
4545
46+ enable_otel_router_metrics = var. enable_otel_router_metrics
47+ otel_router_grpc_port = var. otel_router_grpc_port
48+
4649 clickhouse_username = var. clickhouse_username
4750 clickhouse_password = var. clickhouse_password
4851 clickhouse_port = var. clickhouse_port
Original file line number Diff line number Diff line change @@ -303,6 +303,24 @@ variable "enable_otel_router_logs" {
303303 description = " Enable teeing non-internal customer logs from Vector to otel-router."
304304}
305305
306+ variable "otel_router_http_port" {
307+ type = number
308+ default = 4321
309+ description = " Local otel-router Vector-compatible logs port used by Vector when otel-router log teeing is enabled."
310+ }
311+
312+ variable "enable_otel_router_metrics" {
313+ type = bool
314+ default = false
315+ description = " Enable teeing external customer metrics from otel-collector to otel-router."
316+ }
317+
318+ variable "otel_router_grpc_port" {
319+ type = number
320+ default = 4320
321+ description = " Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
322+ }
323+
306324# Feature flags
307325variable "launch_darkly_api_key" {
308326 type = string
Original file line number Diff line number Diff line change @@ -198,3 +198,21 @@ variable "enable_otel_router_logs" {
198198 default = false
199199 description = " Enable teeing non-internal customer logs from Vector to otel-router."
200200}
201+
202+ variable "otel_router_http_port" {
203+ type = number
204+ default = 4321
205+ description = " Local otel-router Vector-compatible logs port used by Vector when otel-router log teeing is enabled."
206+ }
207+
208+ variable "enable_otel_router_metrics" {
209+ type = bool
210+ default = false
211+ description = " Enable teeing external customer metrics from otel-collector to otel-router."
212+ }
213+
214+ variable "otel_router_grpc_port" {
215+ type = number
216+ default = 4320
217+ description = " Local otel-router OTLP gRPC port used by otel-collector when otel-router metric teeing is enabled."
218+ }
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ tf_vars := \
5959 $(call tfvar, LOKI_RESOURCES_MEMORY_MB) \
6060 $(call tfvar, OTEL_COLLECTOR_RESOURCES_CPU_COUNT) \
6161 $(call tfvar, OTEL_COLLECTOR_RESOURCES_MEMORY_MB) \
62+ $(call tfvar, ENABLE_OTEL_ROUTER_LOGS) \
63+ $(call tfvar, OTEL_ROUTER_HTTP_PORT) \
64+ $(call tfvar, ENABLE_OTEL_ROUTER_METRICS) \
65+ $(call tfvar, OTEL_ROUTER_GRPC_PORT) \
6266 $(call tfvar, TEMPLATE_BUCKET_NAME) \
6367 $(call tfvar, TEMPLATE_BUCKET_LOCATION) \
6468 $(call tfvar, ENVD_TIMEOUT) \
Original file line number Diff line number Diff line change @@ -286,6 +286,9 @@ module "nomad" {
286286 otel_collector_resources_memory_mb = var. otel_collector_resources_memory_mb
287287 otel_collector_resources_cpu_count = var. otel_collector_resources_cpu_count
288288 enable_otel_router_logs = var. enable_otel_router_logs
289+ otel_router_http_port = var. otel_router_http_port
290+ enable_otel_router_metrics = var. enable_otel_router_metrics
291+ otel_router_grpc_port = var. otel_router_grpc_port
289292
290293 # Dashboard API
291294 dashboard_api_count = var. dashboard_api_count
Original file line number Diff line number Diff line change @@ -322,6 +322,9 @@ module "otel_collector" {
322322 grafana_username = data. google_secret_manager_secret_version . grafana_username . secret_data
323323 consul_token = var. consul_acl_token_secret
324324
325+ enable_otel_router_metrics = var. enable_otel_router_metrics
326+ otel_router_grpc_port = var. otel_router_grpc_port
327+
325328 clickhouse_username = var. clickhouse_username
326329 clickhouse_password = random_password. clickhouse_password . result
327330 clickhouse_port = var. clickhouse_server_port . port
You can’t perform that action at this time.
0 commit comments