Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend CloudWatch Agent AppSignals EC2 tests for MacOS and Window #405

Merged
merged 110 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
909df9c
Changing Latency to nonzero value to get rid of InvalidMetrics
Paramadon Mar 20, 2024
0a31031
testing some feature
Paramadon Apr 1, 2024
cdd6e50
printing out request of query
Paramadon Apr 1, 2024
f6b5fad
changing namespace for appsignal metrics
Paramadon Apr 2, 2024
78ee16b
adding app_signals to the namespace
Paramadon Apr 2, 2024
d9f52f4
adding app_signals to agent config
Paramadon Apr 2, 2024
3abb623
fixing agent config
Paramadon Apr 2, 2024
cf6e78f
fixing agent json
Paramadon Apr 2, 2024
e79eadc
fixing agent json
Paramadon Apr 2, 2024
df610e7
log event
Paramadon Apr 2, 2024
0bb2994
adding log statements to test why macOs test is not working
Paramadon Apr 3, 2024
e7a9ec0
fixing app signals validation
Paramadon Apr 3, 2024
9a21953
trying to fix query
Paramadon Apr 3, 2024
f62b02b
trying to fix query
Paramadon Apr 3, 2024
357038e
trying to fix query
Paramadon Apr 3, 2024
b426c98
trying to fix query
Paramadon Apr 3, 2024
6d836e4
trying to fix query
Paramadon Apr 3, 2024
caec7ca
trying to fix query
Paramadon Apr 3, 2024
9babbad
trying to fix query
Paramadon Apr 3, 2024
e36295b
trying to fix query
Paramadon Apr 3, 2024
7633bdd
trying to fix query
Paramadon Apr 3, 2024
f2c99fe
trying to fix query
Paramadon Apr 3, 2024
d91b8e6
trying to fix query
Paramadon Apr 3, 2024
c30881e
trying to fix query
Paramadon Apr 3, 2024
8200db6
trying to fix query
Paramadon Apr 3, 2024
31104b0
trying to fix query
Paramadon Apr 3, 2024
269ab69
trying to fix query
Paramadon Apr 3, 2024
08d4245
trying to fix query
Paramadon Apr 3, 2024
036ee15
trying to fix query
Paramadon Apr 3, 2024
af13a4b
fixing dimensions of app signal
Paramadon Apr 3, 2024
80564a6
this should work...
Paramadon Apr 3, 2024
f5a70cf
fixing sample count
Paramadon Apr 3, 2024
89364c8
fixing inifinite loop on app sig
Paramadon Apr 3, 2024
4c618c5
fixing retry count
Paramadon Apr 3, 2024
1ffc986
fixing retry count
Paramadon Apr 3, 2024
f593fd2
adding windows component of the test
Paramadon Apr 3, 2024
00aab07
adding windows component of the test
Paramadon Apr 3, 2024
fa1062c
fixing parameters.yml agent_collection_period
Paramadon Apr 3, 2024
73f6d13
fixing sample count
Paramadon Apr 4, 2024
42bf987
adding traces testing
Paramadon Apr 4, 2024
8a7dc41
adding a break in between sending metrics
Paramadon Apr 4, 2024
c323a05
adding instance id to app signal metrics
Paramadon Apr 5, 2024
f4fce69
fixing dimension
Paramadon Apr 5, 2024
1eda9e7
seeing if app signal works
Paramadon Apr 6, 2024
26b07ce
first tyring to generate data regularly than will add instance id
Paramadon Apr 6, 2024
cf7b928
first tyring to generate data regularly than will add instance id
Paramadon Apr 6, 2024
cd6f102
previous commit works, this adds instance id to metric
Paramadon Apr 6, 2024
1c32d67
the last commit did not work, but having a better way to verify metrics
Paramadon Apr 6, 2024
0cfa7e0
accidently removed all of client_producer
Paramadon Apr 6, 2024
3f5a75d
Everything works
Paramadon Apr 7, 2024
c3ec34a
agent config is wrong
Paramadon Apr 7, 2024
02a4e79
This works really well with deployment just need to add the others (i…
Paramadon Apr 12, 2024
2bb5241
doing git pull
Paramadon Apr 18, 2024
a6bf09d
pushing changes
Paramadon Apr 18, 2024
47ad0e3
xray filter
Paramadon Apr 18, 2024
bf973b3
xray filter
Paramadon Apr 18, 2024
9362a97
fixing test
Paramadon Apr 18, 2024
e3952af
getting trace Ids
Paramadon Apr 18, 2024
b0fd08a
changing timing
Paramadon Apr 18, 2024
5376d22
adding a xray filter
Paramadon Apr 18, 2024
456fdde
changing type of stat
Paramadon Apr 18, 2024
b46bdbf
changing type of stat
Paramadon Apr 18, 2024
3b3ab21
changing type of stat
Paramadon Apr 18, 2024
b56af79
commenting out traces
Paramadon Apr 19, 2024
533de0f
sample count
Paramadon Apr 19, 2024
68c8d3a
testing something
Paramadon Apr 19, 2024
6f31361
change exponential histogram to sum to see if metrics show up
Paramadon Apr 19, 2024
24e26b5
changing back to expHist, sum generates metric but not sure why expHi…
Paramadon Apr 19, 2024
3031cb4
changing how sum, min,max are
Paramadon Apr 19, 2024
9b9b132
removing sum,max,min to see if metrics come
Paramadon Apr 19, 2024
7015d10
removing everything from exponentatial and seeing if emtrics come
Paramadon Apr 19, 2024
a942bbe
tyring to fix json values
Paramadon Apr 19, 2024
269cb81
tyring to fix json values
Paramadon Apr 19, 2024
c33d817
previous commit generated metrics but it was a lotttt so trying to fi…
Paramadon Apr 19, 2024
76f8db2
previous commit generated metrics but it was a lotttt so trying to fi…
Paramadon Apr 19, 2024
91277ae
adding marshalling
Paramadon Apr 19, 2024
9c285a1
adding test
Paramadon Apr 19, 2024
ddefa9d
changing sum to sample count
Paramadon Apr 19, 2024
fe6ab31
changing stat to sum
Paramadon Apr 19, 2024
02d0b7b
adding traces
Paramadon Apr 19, 2024
8cc8ee4
tyrign to get trace ids
Paramadon Apr 19, 2024
a86d6f4
tyrign to get trace ids
Paramadon Apr 19, 2024
a81795c
prev trac ids do generate
Paramadon Apr 19, 2024
fb8f693
adding to traceids
Paramadon Apr 19, 2024
da371ad
this works with traces too
Paramadon Apr 19, 2024
e190808
Tests works for macos and windows
Paramadon Apr 22, 2024
82469aa
Tests works for macos and windows
Paramadon Apr 22, 2024
6a039c5
Tests works for macos and windows
Paramadon Apr 22, 2024
ae872ce
Tests works for macos and windows
Paramadon Apr 22, 2024
309bdfc
Tests works for macos and windows
Paramadon Apr 22, 2024
1c3a198
Merge branch 'main' of github.com:aws/amazon-cloudwatch-agent-test in…
Paramadon Apr 22, 2024
a198d42
Tests works for macos and windows
Paramadon Apr 22, 2024
b20ae4b
Tests works for macos and windows
Paramadon Apr 22, 2024
f993321
Tests works for macos and windows
Paramadon Apr 22, 2024
39c2071
Tests works for macos and windows
Paramadon Apr 22, 2024
205b882
Tests works for macos and windows
Paramadon Apr 22, 2024
eafe9bf
Tests works for macos and windows
Paramadon Apr 22, 2024
8002975
Tests works for macos and windows
Paramadon Apr 22, 2024
0112b5d
Removing terraform delete
Paramadon Apr 22, 2024
98aa56e
making sure to checkout the correct test branch
Paramadon Apr 23, 2024
b8acfcb
adding all the instance back
Paramadon Apr 23, 2024
b6b3962
making sure agent configuration is right
Paramadon Apr 23, 2024
aa19fb4
test one more time to make sure
Paramadon Apr 23, 2024
2439b71
Finished testing
Paramadon Apr 23, 2024
05834b2
adding tests
Paramadon Apr 23, 2024
c73f8e2
running lint
Paramadon Apr 23, 2024
90e0fd1
resolving all comment(cleaning up code)
Paramadon Apr 24, 2024
c1bef9c
testing
Paramadon Apr 24, 2024
6f2689f
Test is passing
Paramadon Apr 24, 2024
5109add
changing var name
Paramadon Apr 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading