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 option for automatic JMX retry #3511
Conversation
} | ||
|
||
@Test | ||
void testMBeanExceptionWhenRegisteredThenOk() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] this tests the new behavior, every other change is mostly refactoring in this file.
} | ||
return value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] this allows to set a breakpoint to investigate the captured value when debugging.
register(jmxConfiguration.getCaptureJmxMetrics().get(), platformMBeanServer); | ||
|
||
ConfigurationOption<TimeDuration> failedRetryConfig = jmxConfiguration.getFaildRetryInterval(); | ||
long retryMillis = failedRetryConfig.getValue().getMillis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scope is inside the if statement, why here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 91f49cf
apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetricTracker.java
Show resolved
Hide resolved
run docs-build |
What does this PR do?
Some MBeans throw exceptions when the state they expose isn't completely initialized yet.
When the agent starts, such MBeans will be ignored by the agent as they can't be accessed and the agent requires to get their values on registration to get their type, in particular for composite attributes, this is not something that can't be known before invocation.
Checklist