-
Notifications
You must be signed in to change notification settings - Fork 873
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
Fix NoClassDefFoundError happening when snakeyaml is used on a custom JRE #7598
Fix NoClassDefFoundError happening when snakeyaml is used on a custom JRE #7598
Conversation
.../jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/yaml/RuleParser.java
Outdated
Show resolved
Hide resolved
@@ -417,19 +421,6 @@ void testEmptyTagFromParameter() { | |||
runNegativeTest(yaml); | |||
} | |||
|
|||
@Test | |||
void testEmptyPrefix() { |
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.
This test case no longer makes any sense with the new parser.
Yaml yaml = new Yaml(new Constructor(JmxConfig.class)); | ||
return yaml.load(is); | ||
@SuppressWarnings("unchecked") | ||
public JmxConfig loadConfig(InputStream is) { |
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.
I think that the whole JMX config parsing module needs some further refactoring -- we could simplify the code, remove mutability, and clearly separate parsing from converting the config to its "executable" form. Not in this PR though, let's not mix concerns.
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.
@PeterF778 if you have a chance, can you review these changes to the jmx-metrics module?
...n/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/yaml/JmxConfig.java
Outdated
Show resolved
Hide resolved
The changes look good. Thanks, @mateuszrzeszutek, for rewriting the JMX Metric Insight yaml parser to work with snakeyaml-engine. |
635ecfe
to
9c4d20a
Compare
Fixes #7580