Skip to content

Commit e7004da

Browse files
committed
fixup! feat(aws): AWSX-1566 Adding new variable in the cloudformation template
Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com>
1 parent cc6b239 commit e7004da

13 files changed

+14
-300
lines changed

aws/logs_monitoring/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def __init__(self, name, pattern, placeholder, enabled=True):
253253
DD_ENRICH_S3_TAGS = get_env_var("DD_ENRICH_S3_TAGS", default="true", boolean=True)
254254

255255
DD_ENRICH_CLOUDWATCH_TAGS = get_env_var(
256-
"DD_ENRICH_CLOUDWATCH_TAGS", default="false", boolean=True
256+
"DD_ENRICH_CLOUDWATCH_TAGS", default="true", boolean=True
257257
)
258258

259259

aws/logs_monitoring/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ Metadata:
10351035
default: Advanced (Optional)
10361036
Parameters:
10371037
- DdEnrichS3Tags
1038-
- DdEnrichCloudwwatchTags
1038+
- DdEnrichCloudwatchTags
10391039
- DdFetchLambdaTags
10401040
- DdFetchLogGroupTags
10411041
- DdFetchStepFunctionsTags

aws/logs_monitoring/tools/integration_tests/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ services:
4040
DD_USE_COMPRESSION: "false"
4141
DD_ADDITIONAL_TARGET_LAMBDAS: "${EXTERNAL_LAMBDAS}"
4242
DD_S3_BUCKET_NAME: "${DD_S3_BUCKET_NAME}"
43-
DD_FETCH_LAMBDA_TAGS: "true"
44-
DD_FETCH_LOG_GROUP_TAGS: "true"
45-
DD_FETCH_STEP_FUNCTIONS_TAGS: "false" # intentionally set false to allow integration test for step function logs to run without hitting aws
43+
DD_FETCH_LAMBDA_TAGS: "${DD_FETCH_LAMBDA_TAGS:-false}"
44+
DD_FETCH_LOG_GROUP_TAGS: "${DD_FETCH_LOG_GROUP_TAGS:-false}"
45+
DD_FETCH_STEP_FUNCTIONS_TAGS: "${DD_FETCH_STEP_FUNCTIONS_TAGS:-false}"
4646
DD_STORE_FAILED_EVENTS: "false"
4747
DD_TRACE_ENABLED: "true"
4848
expose:

aws/logs_monitoring/tools/integration_tests/integration_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Unless explicitly stated otherwise all files in this repository are licensed
44
# under the Apache License Version 2.0.

aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_customized_log_group_lambda_invocation.json~snapshot

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"DD-API-KEY": "abcdefghijklmnopqrstuvwxyz012345",
7676
"DD-EVP-ORIGIN": "aws_forwarder",
7777
"DD-EVP-ORIGIN-VERSION": "<redacted from snapshot>",
78+
"DD-STORAGE-TAG": "s3,cloudwatch",
7879
"Host": "recorder:8080",
7980
"User-Agent": "<redacted from snapshot>",
8081
"traceparent": "<redacted from snapshot>",
@@ -90,48 +91,6 @@
9091
{
9192
"data": {
9293
"series": [
93-
{
94-
"device": null,
95-
"host": null,
96-
"interval": 10,
97-
"metric": "aws.dd_forwarder.loggroup_cache_fetch_failure",
98-
"points": "<redacted from snapshot>",
99-
"tags": [
100-
"forwardername:test_function",
101-
"forwarder_memorysize:3008",
102-
"forwarder_version:<redacted from snapshot>",
103-
"event_type:awslogs"
104-
],
105-
"type": "distribution"
106-
},
107-
{
108-
"device": null,
109-
"host": null,
110-
"interval": 10,
111-
"metric": "aws.dd_forwarder.list_tags_log_group_api_call",
112-
"points": "<redacted from snapshot>",
113-
"tags": [
114-
"forwardername:test_function",
115-
"forwarder_memorysize:3008",
116-
"forwarder_version:<redacted from snapshot>",
117-
"event_type:awslogs"
118-
],
119-
"type": "distribution"
120-
},
121-
{
122-
"device": null,
123-
"host": null,
124-
"interval": 10,
125-
"metric": "aws.dd_forwarder.loggroup_cache_write_failure",
126-
"points": "<redacted from snapshot>",
127-
"tags": [
128-
"forwardername:test_function",
129-
"forwarder_memorysize:3008",
130-
"forwarder_version:<redacted from snapshot>",
131-
"event_type:awslogs"
132-
],
133-
"type": "distribution"
134-
},
13594
{
13695
"device": null,
13796
"host": null,

aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"DD-API-KEY": "abcdefghijklmnopqrstuvwxyz012345",
4949
"DD-EVP-ORIGIN": "aws_forwarder",
5050
"DD-EVP-ORIGIN-VERSION": "<redacted from snapshot>",
51+
"DD-STORAGE-TAG": "s3,cloudwatch",
5152
"Host": "recorder:8080",
5253
"User-Agent": "<redacted from snapshot>",
5354
"traceparent": "<redacted from snapshot>",
@@ -63,48 +64,6 @@
6364
{
6465
"data": {
6566
"series": [
66-
{
67-
"device": null,
68-
"host": null,
69-
"interval": 10,
70-
"metric": "aws.dd_forwarder.loggroup_cache_fetch_failure",
71-
"points": "<redacted from snapshot>",
72-
"tags": [
73-
"forwardername:test_function",
74-
"forwarder_memorysize:3008",
75-
"forwarder_version:<redacted from snapshot>",
76-
"event_type:awslogs"
77-
],
78-
"type": "distribution"
79-
},
80-
{
81-
"device": null,
82-
"host": null,
83-
"interval": 10,
84-
"metric": "aws.dd_forwarder.list_tags_log_group_api_call",
85-
"points": "<redacted from snapshot>",
86-
"tags": [
87-
"forwardername:test_function",
88-
"forwarder_memorysize:3008",
89-
"forwarder_version:<redacted from snapshot>",
90-
"event_type:awslogs"
91-
],
92-
"type": "distribution"
93-
},
94-
{
95-
"device": null,
96-
"host": null,
97-
"interval": 10,
98-
"metric": "aws.dd_forwarder.loggroup_cache_write_failure",
99-
"points": "<redacted from snapshot>",
100-
"tags": [
101-
"forwardername:test_function",
102-
"forwarder_memorysize:3008",
103-
"forwarder_version:<redacted from snapshot>",
104-
"event_type:awslogs"
105-
],
106-
"type": "distribution"
107-
},
10867
{
10968
"device": null,
11069
"host": null,

aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_cloudtrail.json~snapshot

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"DD-API-KEY": "abcdefghijklmnopqrstuvwxyz012345",
8585
"DD-EVP-ORIGIN": "aws_forwarder",
8686
"DD-EVP-ORIGIN-VERSION": "<redacted from snapshot>",
87+
"DD-STORAGE-TAG": "s3,cloudwatch",
8788
"Host": "recorder:8080",
8889
"User-Agent": "<redacted from snapshot>",
8990
"traceparent": "<redacted from snapshot>",
@@ -99,48 +100,6 @@
99100
{
100101
"data": {
101102
"series": [
102-
{
103-
"device": null,
104-
"host": null,
105-
"interval": 10,
106-
"metric": "aws.dd_forwarder.loggroup_cache_fetch_failure",
107-
"points": "<redacted from snapshot>",
108-
"tags": [
109-
"forwardername:test_function",
110-
"forwarder_memorysize:3008",
111-
"forwarder_version:<redacted from snapshot>",
112-
"event_type:awslogs"
113-
],
114-
"type": "distribution"
115-
},
116-
{
117-
"device": null,
118-
"host": null,
119-
"interval": 10,
120-
"metric": "aws.dd_forwarder.list_tags_log_group_api_call",
121-
"points": "<redacted from snapshot>",
122-
"tags": [
123-
"forwardername:test_function",
124-
"forwarder_memorysize:3008",
125-
"forwarder_version:<redacted from snapshot>",
126-
"event_type:awslogs"
127-
],
128-
"type": "distribution"
129-
},
130-
{
131-
"device": null,
132-
"host": null,
133-
"interval": 10,
134-
"metric": "aws.dd_forwarder.loggroup_cache_write_failure",
135-
"points": "<redacted from snapshot>",
136-
"tags": [
137-
"forwardername:test_function",
138-
"forwarder_memorysize:3008",
139-
"forwarder_version:<redacted from snapshot>",
140-
"event_type:awslogs"
141-
],
142-
"type": "distribution"
143-
},
144103
{
145104
"device": null,
146105
"host": null,

aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,6 @@
33
{
44
"data": {
55
"series": [
6-
{
7-
"device": null,
8-
"host": null,
9-
"interval": 10,
10-
"metric": "aws.dd_forwarder.loggroup_cache_fetch_failure",
11-
"points": "<redacted from snapshot>",
12-
"tags": [
13-
"forwardername:test_function",
14-
"forwarder_memorysize:3008",
15-
"forwarder_version:<redacted from snapshot>",
16-
"event_type:awslogs"
17-
],
18-
"type": "distribution"
19-
},
20-
{
21-
"device": null,
22-
"host": null,
23-
"interval": 10,
24-
"metric": "aws.dd_forwarder.list_tags_log_group_api_call",
25-
"points": "<redacted from snapshot>",
26-
"tags": [
27-
"forwardername:test_function",
28-
"forwarder_memorysize:3008",
29-
"forwarder_version:<redacted from snapshot>",
30-
"event_type:awslogs"
31-
],
32-
"type": "distribution"
33-
},
34-
{
35-
"device": null,
36-
"host": null,
37-
"interval": 10,
38-
"metric": "aws.dd_forwarder.loggroup_cache_write_failure",
39-
"points": "<redacted from snapshot>",
40-
"tags": [
41-
"forwardername:test_function",
42-
"forwarder_memorysize:3008",
43-
"forwarder_version:<redacted from snapshot>",
44-
"event_type:awslogs"
45-
],
46-
"type": "distribution"
47-
},
486
{
497
"device": null,
508
"host": null,

aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"DD-API-KEY": "abcdefghijklmnopqrstuvwxyz012345",
3131
"DD-EVP-ORIGIN": "aws_forwarder",
3232
"DD-EVP-ORIGIN-VERSION": "<redacted from snapshot>",
33+
"DD-STORAGE-TAG": "s3,cloudwatch",
3334
"Host": "recorder:8080",
3435
"User-Agent": "<redacted from snapshot>",
3536
"traceparent": "<redacted from snapshot>",
@@ -45,20 +46,6 @@
4546
{
4647
"data": {
4748
"series": [
48-
{
49-
"device": null,
50-
"host": null,
51-
"interval": 10,
52-
"metric": "aws.dd_forwarder.loggroup_local_cache_hit",
53-
"points": "<redacted from snapshot>",
54-
"tags": [
55-
"forwardername:test_function",
56-
"forwarder_memorysize:3008",
57-
"forwarder_version:<redacted from snapshot>",
58-
"event_type:awslogs"
59-
],
60-
"type": "distribution"
61-
},
6249
{
6350
"device": null,
6451
"host": null,

aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@
348348
"DD-API-KEY": "abcdefghijklmnopqrstuvwxyz012345",
349349
"DD-EVP-ORIGIN": "aws_forwarder",
350350
"DD-EVP-ORIGIN-VERSION": "<redacted from snapshot>",
351+
"DD-STORAGE-TAG": "s3,cloudwatch",
351352
"Host": "recorder:8080",
352353
"User-Agent": "<redacted from snapshot>",
353354
"traceparent": "<redacted from snapshot>",
@@ -717,48 +718,6 @@
717718
{
718719
"data": {
719720
"series": [
720-
{
721-
"device": null,
722-
"host": null,
723-
"interval": 10,
724-
"metric": "aws.dd_forwarder.loggroup_cache_fetch_failure",
725-
"points": "<redacted from snapshot>",
726-
"tags": [
727-
"forwardername:test_function",
728-
"forwarder_memorysize:3008",
729-
"forwarder_version:<redacted from snapshot>",
730-
"event_type:awslogs"
731-
],
732-
"type": "distribution"
733-
},
734-
{
735-
"device": null,
736-
"host": null,
737-
"interval": 10,
738-
"metric": "aws.dd_forwarder.list_tags_log_group_api_call",
739-
"points": "<redacted from snapshot>",
740-
"tags": [
741-
"forwardername:test_function",
742-
"forwarder_memorysize:3008",
743-
"forwarder_version:<redacted from snapshot>",
744-
"event_type:awslogs"
745-
],
746-
"type": "distribution"
747-
},
748-
{
749-
"device": null,
750-
"host": null,
751-
"interval": 10,
752-
"metric": "aws.dd_forwarder.loggroup_cache_write_failure",
753-
"points": "<redacted from snapshot>",
754-
"tags": [
755-
"forwardername:test_function",
756-
"forwarder_memorysize:3008",
757-
"forwarder_version:<redacted from snapshot>",
758-
"event_type:awslogs"
759-
],
760-
"type": "distribution"
761-
},
762721
{
763722
"device": null,
764723
"host": null,

0 commit comments

Comments
 (0)