jmxtrans-agent icon indicating copy to clipboard operation
jmxtrans-agent copied to clipboard

Add CloudWatchOutputWriter using the v2 AWS SDK and async cloudwatch client

Open deuscapturus opened this issue 4 years ago • 2 comments

Tested on OpenJDK 1.8

  • Single jar execution goal was added to include AWS SDK
  • Maven plugin source/target 1.8 version was required to support the single jar build
  • Using maven-assembly-plugin instead of maven-jar-plugin to support single jar build.

deuscapturus avatar Apr 23 '20 17:04 deuscapturus

It looks like this repo has been abandoned. Anyone looking for this feature can find it at my fork. https://github.com/deuscapturus/jmxtrans-agent/releases

deuscapturus avatar Apr 28 '20 19:04 deuscapturus

Thank you @deuscapturus for your contribution,

As you have said, this repo is unfortunately no longer actively maintained due to bandwidth constraints. Regarding the support for CloudWatch, the jmxtrans-agent library has decided to not pull external dependencies to limit the risk of conflicts between jars (see https://github.com/jmxtrans/jmxtrans-agent/issues/90 for example). Adding the AWS SDK jars would add some but not all AWS SDK and Netty jars and that could cause nasty class loading bugs.

Could it be possible to make the AWS SDK jars optional and to add them in the path through the startup command line? I am afraid that it would make a lot of jars to manually add to the path, I found 20+ jars being pulled by software.amazon.awssdk:cloudwatch:jar:2.13.0.

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jmxtrans-agent ---
[INFO] org.jmxtrans.agent:jmxtrans-agent:jar:1.2.10-SNAPSHOT
[INFO] +- com.sun:tools:jar:1.4.2:system
[INFO] +- com.google.code.findbugs:jsr305:jar:2.0.1:compile
[INFO] +- com.google.code.findbugs:annotations:jar:3.0.0:compile
[INFO] +- joda-time:joda-time:jar:2.2:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:test
[INFO] +- org.skyscreamer:jsonassert:jar:1.2.3:test
[INFO] |  \- org.json:json:jar:20090211:test
[INFO] +- com.github.tomakehurst:wiremock:jar:2.5.1:test
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:9.2.13.v20150730:test
[INFO] |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:test
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.2.13.v20150730:test
[INFO] |  |  \- org.eclipse.jetty:jetty-io:jar:9.2.13.v20150730:test
[INFO] |  +- org.eclipse.jetty:jetty-servlet:jar:9.2.13.v20150730:test
[INFO] |  |  \- org.eclipse.jetty:jetty-security:jar:9.2.13.v20150730:test
[INFO] |  +- org.eclipse.jetty:jetty-servlets:jar:9.2.13.v20150730:test
[INFO] |  |  +- org.eclipse.jetty:jetty-continuation:jar:9.2.13.v20150730:test
[INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:9.2.13.v20150730:test
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.2.13.v20150730:test
[INFO] |  |  \- org.eclipse.jetty:jetty-xml:jar:9.2.13.v20150730:test
[INFO] |  +- com.google.guava:guava:jar:18.0:test
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.6.1:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.1:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.1:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.1:runtime
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.3:runtime
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:runtime
[INFO] |  |  \- commons-codec:commons-codec:jar:1.9:runtime
[INFO] |  +- org.xmlunit:xmlunit-core:jar:2.3.0:test
[INFO] |  +- org.xmlunit:xmlunit-legacy:jar:2.3.0:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.2.1:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.1:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.12:compile
[INFO] |  +- net.sf.jopt-simple:jopt-simple:jar:4.9:test
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.4:test
[INFO] |  +- com.flipkart.zjsonpatch:zjsonpatch:jar:0.2.1:test
[INFO] |  |  \- org.apache.commons:commons-collections4:jar:4.0:test
[INFO] |  \- com.github.jknack:handlebars:jar:4.0.6:test
[INFO] |     \- org.antlr:antlr4-runtime:jar:4.5.1-1:test
[INFO] \- software.amazon.awssdk:cloudwatch:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:aws-query-protocol:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:protocol-core:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:sdk-core:jar:2.13.0:compile
[INFO]    |  +- software.amazon.awssdk:profiles:jar:2.13.0:compile
[INFO]    |  \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO]    +- software.amazon.awssdk:auth:jar:2.13.0:compile
[INFO]    |  \- software.amazon.eventstream:eventstream:jar:1.0.1:compile
[INFO]    +- software.amazon.awssdk:http-client-spi:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:regions:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:annotations:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:utils:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:aws-core:jar:2.13.0:compile
[INFO]    +- software.amazon.awssdk:apache-client:jar:2.13.0:runtime
[INFO]    \- software.amazon.awssdk:netty-nio-client:jar:2.13.0:runtime
[INFO]       +- io.netty:netty-codec-http:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-codec-http2:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-codec:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-transport:jar:4.1.46.Final:runtime
[INFO]       |  \- io.netty:netty-resolver:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-common:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-buffer:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-handler:jar:4.1.46.Final:runtime
[INFO]       +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.46.Final:runtime
[INFO]       |  \- io.netty:netty-transport-native-unix-common:jar:4.1.46.Final:runtime
[INFO]       \- com.typesafe.netty:netty-reactive-streams-http:jar:2.0.4:runtime
[INFO]          \- com.typesafe.netty:netty-reactive-streams:jar:2.0.4:runtime
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

cyrille-leclerc avatar May 11 '20 15:05 cyrille-leclerc