Skip to content

Commit

Permalink
Extend CloudWatch Agent AppSignals EC2 tests for MacOS and Window (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon authored Apr 30, 2024
1 parent d4e556e commit a273a24
Show file tree
Hide file tree
Showing 10 changed files with 522 additions and 155 deletions.
43 changes: 33 additions & 10 deletions test/app_signals/resources/metrics/client_producer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 0,
"min": 0,
"max": 0
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand Down Expand Up @@ -131,9 +139,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 0,
"min": 0,
"max": 0
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand Down Expand Up @@ -184,9 +200,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 0,
"min": 0,
"max": 0
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand All @@ -197,4 +221,3 @@
}
]
}

72 changes: 56 additions & 16 deletions test/app_signals/resources/metrics/server_consumer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 0,
"min": 0,
"max": 0
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand Down Expand Up @@ -143,9 +151,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 0,
"min": 0,
"max": 0
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand Down Expand Up @@ -202,9 +218,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 0,
"min": 0,
"max": 0
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand Down Expand Up @@ -259,11 +283,20 @@
}
}
],

"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 1,
"min": 1,
"max": 1
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand Down Expand Up @@ -320,9 +353,17 @@
],
"startTimeUnixNano": START_TIME,
"timeUnixNano": START_TIME,
"sum": 1,
"min": 1,
"max": 1
"count": 0,
"scale": 0,
"zeroCount": 0,
"positive": {
"offset": 0,
"bucket_counts": [1, 2, 3]
},
"negative": {
"offset": 0,
"bucket_counts": [1, 2, 3]
}
}
]
}
Expand All @@ -333,4 +374,3 @@
}
]
}

190 changes: 98 additions & 92 deletions test/feature/mac/agent_config.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,109 @@
{
"agent": {
"debug": true
},
"metrics": {
"namespace": "CloudWatchAgentMacFeature",
"metrics_collected": {
"statsd": {
"metrics_aggregation_interval": 60,
"metrics_collection_interval": 60,
"service_address": ":8125"
},
"cpu": {
"agent": {
"debug": true
},
"metrics": {
"namespace": "CloudWatchAgentMacFeature",
"metrics_collected": {
"statsd": {
"metrics_aggregation_interval": 60,
"metrics_collection_interval": 60,
"service_address": ":8125"
},
"cpu": {
"measurement": [
"time_active",
"time_guest"
],
"metrics_collection_interval": 1
},
"swap": {
"measurement": [
"free",
"used_percent"
],
"metrics_collection_interval": 1
},
"processes": {
"measurement": [
"blocked",
"running"
],
"metrics_collection_interval": 1
},
"netstat": {
"measurement": [
"tcp_close",
"udp_socket"
],
"metrics_collection_interval": 1
},
"mem": {
"measurement": [
"available_percent",
"used_percent"
],
"metrics_collection_interval": 1
},
"disk": {
"resources": [
"*"
],
"measurement": [
"free",
"used_percent"
],
"drop_device": true,
"metrics_collection_interval": 1
},
"net": {
"resources": [
"en0"
],
"measurement": [
"bytes_sent",
"bytes_recv"
],
"metrics_collection_interval": 1
},
"procstat": [
{
"exe": "amazon-cloudwatch-agent",
"measurement": [
"time_active",
"time_guest"
"cpu_usage",
"memory_rss"
],
"metrics_collection_interval": 1
},
"swap": {
"measurement": [
"free",
"used_percent"
],
"metrics_collection_interval": 1
},
"processes": {
"measurement": [
"blocked",
"running"
],
"metrics_collection_interval": 1
},
"netstat": {
"measurement": [
"tcp_close",
"udp_socket"
],
"metrics_collection_interval": 1
},
"mem": {
"measurement": [
"available_percent",
"used_percent"
],
"metrics_collection_interval": 1
},
"disk": {
"resources": [
"*"
],
"measurement": [
"free",
"used_percent"
],
"drop_device": true,
"metrics_collection_interval": 1
},
"net": {
"resources": [
"en0"
],
"measurement": [
"bytes_sent",
"bytes_recv"
],
"metrics_collection_interval": 1
},
"procstat": [
{
"exe": "amazon-cloudwatch-agent",
"measurement": [
"cpu_usage",
"memory_rss"
],
"metrics_collection_interval": 1
}
]
},
"append_dimensions": {
"InstanceId": "${aws:InstanceId}"
},
"force_flush_interval": 30
}
]
},
"logs": {
"logs_collected": {
"files": {
"append_dimensions": {
"InstanceId": "${aws:InstanceId}"
},
"force_flush_interval": 30
},
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/tmp/test1.log",
"log_group_name": "{instance_id}",
"log_stream_name": "test1.log",
"timezone": "UTC"
"file_path": "/tmp/test1.log",
"log_group_name": "{instance_id}",
"log_stream_name": "test1.log",
"timezone": "UTC"
}
]
}
},
"metrics_collected": {
"emf": { }
},
"force_flush_interval": 5
}
},
"metrics_collected": {
"app_signals": {},
"emf": { }
},
"force_flush_interval": 5
},
"traces": {
"traces_collected": {
"app_signals": {}
}
}
}
Loading

0 comments on commit a273a24

Please sign in to comment.