Skip to content

Commit 452480d

Browse files
authored
disable logging to datadog by default (#2653)
* disable logging to datadog by default When the logging_datadog section was added in #2519, there was no logging condition applied leading to all requests being logged to datadog. this adds a "False" condition so that logs are only emitted from the rate limiter * rename response condition for clarity
1 parent 3ad7b96 commit 452480d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

infra/cdn/main.tf

+11-4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ resource "fastly_service_vcl" "python_org" {
136136
statement = "req.http.host == \"python.org\""
137137
type = "REQUEST"
138138
}
139+
condition {
140+
name = "Always False"
141+
priority = 10
142+
statement = "false"
143+
type = "RESPONSE"
144+
}
139145

140146
condition {
141147
name = "Don't cache 404s for /static"
@@ -262,9 +268,10 @@ resource "fastly_service_vcl" "python_org" {
262268
}
263269

264270
logging_datadog {
265-
name = "ratelimit-debug"
266-
token = var.datadog_key
267-
region = "US"
271+
name = "ratelimit-debug"
272+
token = var.datadog_key
273+
region = "US"
274+
response_condition = "Always False"
268275
}
269276

270277
logging_s3 {
@@ -361,7 +368,7 @@ resource "fastly_service_vcl" "python_org" {
361368
dynamic "dictionary" {
362369
for_each = var.activate_ngwaf_service ? [1] : []
363370
content {
364-
name = var.edge_security_dictionary
371+
name = var.edge_security_dictionary
365372
force_destroy = true
366373
}
367374
}

0 commit comments

Comments
 (0)