Skip to content

Commit

Permalink
insert squad label to all metrics (#634)
Browse files Browse the repository at this point in the history
for chainguard-dev/internal-dev#4886

---------

Signed-off-by: Kenny Leung <[email protected]>
  • Loading branch information
k4leung4 authored Nov 20, 2024
1 parent c2c542e commit c5b570a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/regional-service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ resource "google_cloud_run_v2_service" "this" {
args = ["--config=env:OTEL_CONFIG"]
env {
name = "OTEL_CONFIG"
value = file("${path.module}/otel-config/config.yaml")
value = replace(file("${path.module}/otel-config/config.yaml"), "REPLACE_ME_TEAM", var.squad)
}
}

Expand Down
6 changes: 6 additions & 0 deletions modules/regional-service/otel-config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ receivers:
action: drop

processors:
attributes:
actions:
- action: insert
key: team
value: "REPLACE_ME_TEAM"

batch:
# batch metrics before sending to reduce API usage
send_batch_max_size: 200
Expand Down

0 comments on commit c5b570a

Please sign in to comment.