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

Add JMX Metrics #1024

Closed
wants to merge 1 commit into from
Closed

Conversation

sethAmazon
Copy link
Contributor

Add Auth Information To JMX

Add Default JMX Targets`

Add opentelemetry-jmx-metrics.jar To Deb, Darwin Zip, Windows, Zip

Description of the issue

CloudWatch agent does not support jmx

Description of changes

Add support for jmx

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

aws/amazon-cloudwatch-agent-test#385

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@sethAmazon sethAmazon requested a review from a team as a code owner January 30, 2024 22:21
@sethAmazon sethAmazon marked this pull request as draft January 30, 2024 22:27
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2024

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (96d4763) 57.58% compared to head (108db0f) 63.34%.
Report is 480 commits behind head on main.

Files Patch % Lines
cfg/aws/credentials.go 0.00% 22 Missing ⚠️
cfg/aws/shared_config.go 62.50% 15 Missing ⚠️
cfg/envconfig/envconfig.go 50.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1024      +/-   ##
==========================================
+ Coverage   57.58%   63.34%   +5.76%     
==========================================
  Files         370      366       -4     
  Lines       17548    18919    +1371     
==========================================
+ Hits        10105    11985    +1880     
+ Misses       6848     6313     -535     
- Partials      595      621      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Add Auth Information To JMX

Add Default JMX Targets`

Add opentelemetry-jmx-metrics.jar To Deb, Darwin Zip, Windows, Zip

Add Test Repo Branch When Building MSI
@sethAmazon sethAmazon force-pushed the feature-jmx-metrics-b branch from cc7189e to 108db0f Compare January 30, 2024 22:54
@@ -224,9 +226,65 @@ func TranslateJsonMapToYamlConfig(jsonConfigValue interface{}) (interface{}, err
if err = conf.Marshal(cfg); err != nil {
return nil, err
}
return conf.ToStringMap(), nil
strMap := conf.ToStringMap()
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 is all copied from [REDACTED]

func RemoveTLSRedacted(stringMap map[string]interface{}) {
type Node struct {
isTLSParent bool
isJMXParent bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Except this

"github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/receiver/jmx"
)

func NewTranslators(conf *confmap.Conf, os string) (pipeline.TranslatorMap, error) {
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 is copied from [REDACTED]

@@ -51,32 +49,16 @@ func Translate(jsonConfig interface{}, os string) (*otelcol.Config, error) {
log.Printf("W! CSM has already been deprecated")
}

adapterReceivers, err := adapter.FindReceiversInConfig(conf, os)
translators, err := host.NewTranslators(conf, os)
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 is copied from [REDACTED]

@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
Copy link
Contributor

github-actions bot commented Feb 7, 2024

This PR was marked stale due to lack of activity.

@github-actions github-actions bot added the Stale label Feb 7, 2024
@sethAmazon sethAmazon closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants