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

[jmxfetch] run() will be non-static for App #3190

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion dd-java-agent/agent-jmxfetch/agent-jmxfetch.gradle
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ plugins {
apply from: "$rootDir/gradle/java.gradle"

dependencies {
api('com.datadoghq:jmxfetch:0.44.1') {
api('com.datadoghq:jmxfetch:0.45.1') {
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
exclude group: 'org.slf4j', module: 'slf4j-api'
Original file line number Diff line number Diff line change
@@ -100,6 +100,7 @@ private static void run(final StatsDClientManager statsDClientManager, final Con
configBuilder.checkPeriod(checkPeriod);
}
final AppConfig appConfig = configBuilder.build();
private App app = new App(appConfig);
Copy link
Contributor

Choose a reason for hiding this comment

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

private is unnecessary here but final would be good

Copy link
Member Author

Choose a reason for hiding this comment

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

My bad, I originally had that as a class attribute, then moved it into the run() method. Will mark final.


final Thread thread =
newAgentThread(
@@ -109,7 +110,7 @@ private static void run(final StatsDClientManager statsDClientManager, final Con
public void run() {
while (true) {
try {
final int result = App.run(appConfig);
final int result = app.run();
log.error("jmx collector exited with result: " + result);
} catch (final Exception e) {
log.error("Exception in jmx collector thread", e);