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

Conversation

Paramadon
Copy link
Contributor

@Paramadon Paramadon commented Apr 23, 2024

Description of the issue

Extending Linux App signal EC2 Test to work on MacOs and Windows.

Description of changes

Changing the validator, which is what MacOs and Winows use for their testing, to have a test for app signals. Both App Signals and Traces are being tested.

Running Integration test

https://github.com/aws/amazon-cloudwatch-agent/actions/runs/8820034431/job/24213490204

Why are some test failing?

If you look at the logs of the test, the validator is passing, those are different issues not correlated with this pr.

Steps taken for testing

  1. Add AppSignal Metrics to parameters.yml file (validator uses this to know which metrics to validate, in this case we added "Latency", "Error, and "Fault")
  2. Generate AppSignals/Traces Metrics
  3. Verify AppSignals/Traces Metrics

Additional change needed to be made

Corrected the json files to generate AppSignals metrics so that App Signal metrics are being generated properly

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Describe what tests you have done.

@Paramadon Paramadon requested a review from a team as a code owner April 23, 2024 15:03
@Paramadon Paramadon changed the title MacOS and Windows App Signal EC2 Test Extend CloudWatch Agent EC2 tests for MacOS and Window Apr 23, 2024
@Paramadon Paramadon changed the title Extend CloudWatch Agent EC2 tests for MacOS and Window Extend CloudWatch Agent AppSignals EC2 tests for MacOS and Window Apr 23, 2024
Copy link
Contributor

@okankoAMZ okankoAMZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

util/awsservice/constant.go Show resolved Hide resolved
util/awsservice/constant.go Show resolved Hide resolved
util/common/metrics.go Outdated Show resolved Hide resolved
func SendAppTraceMetrics(duration time.Duration) error {
baseDir := getBaseDir()

for i := 0; i < int(duration/(5*time.Second)); i++ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I think using TimeTicker would be easier to maintain and will be less flakey. Here is an example from traces-test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still insist by this

util/common/metrics.go Show resolved Hide resolved
util/common/metrics.go Show resolved Hide resolved
util/common/metrics.go Outdated Show resolved Hide resolved
validator/validators/basic/basic_validator.go Outdated Show resolved Hide resolved
validator/validators/basic/basic_validator.go Outdated Show resolved Hide resolved
validator/validators/basic/basic_validator.go Show resolved Hide resolved
@okankoAMZ
Copy link
Contributor

Can you also git-rebase to squash the commits before you merge

util/common/metrics.go Show resolved Hide resolved
validator/validators/basic/basic_validator.go Outdated Show resolved Hide resolved
validator/validators/basic/basic_validator.go Outdated Show resolved Hide resolved
validator/main.go Outdated Show resolved Hide resolved
@Paramadon Paramadon requested review from movence and okankoAMZ April 25, 2024 15:45
util/common/metrics.go Outdated Show resolved Hide resolved
@Paramadon Paramadon requested a review from movence April 29, 2024 22:53
Copy link
Contributor

@okankoAMZ okankoAMZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking, but there is still changes I would like to see

func SendAppTraceMetrics(duration time.Duration) error {
baseDir := getBaseDir()

for i := 0; i < int(duration/(5*time.Second)); i++ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still insist by this

@Paramadon Paramadon merged commit a273a24 into main Apr 30, 2024
2 checks passed
@Paramadon Paramadon deleted the MacOSEC2Test branch June 14, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants