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

Jmx metrics #385

Merged
merged 1 commit into from
May 29, 2024
Merged

Jmx metrics #385

merged 1 commit into from
May 29, 2024

Conversation

sethAmazon
Copy link
Contributor

Description of the issue

No jmx metrics tests.

Description of changes

Add jmx metrics test to metric value benchmark test.

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

https://github.com/aws/amazon-cloudwatch-agent/actions/runs/7544852634/job/20735092549

@sethAmazon sethAmazon requested a review from a team as a code owner January 30, 2024 22:18
@@ -46,7 +46,7 @@ func (n *MetricValueFetcher) Fetch(namespace, metricName string, metricSpecificD
Period: &metricQueryPeriod,
Stat: aws.String(string(stat)),
},
Id: aws.String(strings.ToLower(metricName)),
Id: aws.String(strings.ToLower(strings.ReplaceAll(metricName, ".", "_"))),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

. not allowed in id

@@ -119,6 +119,9 @@
<Component Id='TranslatorEXE' Guid='f4527006-edcb-4271-a971-039848bc8bb7' Win64='yes'>
<File Source='config-translator.exe' KeyPath='yes' Checksum='yes'/>
</Component>
<Component Id='OtelJmxJar' Guid='5af08c39-c483-4b08-8315-c99345684c4d' Win64='yes'>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Required to add jar to msi

}

log.Println("set up zookeeper and kafka")
startJMXCommands := []string{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Start kafka, requires starting zookeeper

@@ -157,5 +158,10 @@ func shouldRunEC2Test(env *environment.MetaData, t *test_runner.TestRunner) bool
}
_, shouldRun := env.EC2PluginTests[strings.ToLower(t.TestRunner.GetTestName())]
_, shouldExclude := env.ExcludedTests[strings.ToLower(t.TestRunner.GetTestName())]
return shouldRun || !shouldExclude
if shouldRun {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix issue with where include was adding all tests instead of only the tests in include

@sethAmazon sethAmazon marked this pull request as draft January 30, 2024 22:27
@sethAmazon sethAmazon marked this pull request as ready for review January 30, 2024 23:15
@sethAmazon sethAmazon marked this pull request as draft January 30, 2024 23:57
@sethAmazon sethAmazon force-pushed the jmx-metrics branch 4 times, most recently from becc77a to 2037bc2 Compare April 15, 2024 16:33
@sethAmazon sethAmazon force-pushed the jmx-metrics branch 8 times, most recently from b1fde3c to a501535 Compare May 29, 2024 14:29
Add opentelemetry-jmx-metrics.jar To MSI

Add Tomcat JMX Metrics Tests
@sethAmazon sethAmazon marked this pull request as ready for review May 29, 2024 14:43
@@ -119,6 +120,9 @@
<Component Id='TranslatorEXE' Guid='f4527006-edcb-4271-a971-039848bc8bb7' Win64='yes'>
<File Source='config-translator.exe' KeyPath='yes' Checksum='yes'/>
</Component>
<Component Id='OtelJmxJar' Guid='5af08c39-c483-4b08-8315-c99345684c4d' Win64='yes'>
<File Source='opentelemetry-jmx-metrics.jar' KeyPath='yes'/>
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need to be changed to packaging/opentelemetry-jmx-metrics.jar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comes from msi zip not the repo. The repo copies to msi zip by the pre package make command

@sethAmazon sethAmazon merged commit 2561d82 into main May 29, 2024
4 checks passed
@sethAmazon sethAmazon deleted the jmx-metrics branch May 29, 2024 18:47
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.

3 participants