Skip to content

Commit

Permalink
[TRA-241] Add exclude_metrics to validator and metrics ingestor (#100)
Browse files Browse the repository at this point in the history
* add exclude_metrics and exclude cometbft p2p

* remove default
  • Loading branch information
ttl33 authored May 21, 2024
1 parent 7a7338d commit 02a6ede
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/metric_ingestor/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module "datadog_agent" {
"openmetrics_endpoint" : validator.openmetrics_endpoint,
"namespace" : var.metrics_namespace,
"metrics" : var.metrics,
"exclude_metrics" : var.exclude_metrics,
"tags" : ["validator_name:${validator.name}", "is_full_node:false"],
"max_returned_metrics" : var.max_returned_metrics
}
Expand Down
11 changes: 11 additions & 0 deletions modules/metric_ingestor/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ variable "metrics" {
]
}

variable "exclude_metrics" {
type = list(string)
description = <<-EOT
A list of metrics to exclude, with each entry being either
the exact metric name or a regular expression.
See https://docs.datadoghq.com/developers/custom_checks/prometheus/#going-further
or https://github.com/DataDog/integrations-core/blob/master/openmetrics/datadog_checks/openmetrics/data/conf.yaml.example#L112
EOT
default = []
}

variable "max_returned_metrics" {
type = number
description = "the number of metrics we allow `com.datadoghq.ad.instances` to return."
Expand Down
1 change: 1 addition & 0 deletions modules/validator/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "datadog_agent" {
"openmetrics_endpoint" : "http://%%host%%:${var.prometheus_port}/metrics?format=prometheus",
"namespace" : var.metrics_namespace,
"metrics" : var.metrics,
"exclude_metrics" : var.exclude_metrics,
"tags" : ["validator_name:dydx", "is_full_node:${var.container_non_validating_full_node}"],
"max_returned_metrics" : var.max_returned_metrics
}
Expand Down
11 changes: 11 additions & 0 deletions modules/validator/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ variable "metrics" {
]
}

variable "exclude_metrics" {
type = list(string)
description = <<-EOT
A list of metrics to exclude, with each entry being either
the exact metric name or a regular expression.
See https://docs.datadoghq.com/developers/custom_checks/prometheus/#going-further
or https://github.com/DataDog/integrations-core/blob/master/openmetrics/datadog_checks/openmetrics/data/conf.yaml.example#L112
EOT
default = []
}

variable "max_returned_metrics" {
type = number
description = "the number of metrics we allow `com.datadoghq.ad.instances` to return."
Expand Down

0 comments on commit 02a6ede

Please sign in to comment.