-
Notifications
You must be signed in to change notification settings - Fork 916
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
Spring boot runtime metrics naive reduced multi config #13236
Spring boot runtime metrics naive reduced multi config #13236
Conversation
This reverts commit 2cf304e.
…Spring3/io/opentelemetry/instrumentation/spring/autoconfigure/internal/instrumentation/runtimemetrics/RuntimeMetricsBeanRegistrationExcludeFilter.java Co-authored-by: Jean Bisutti <[email protected]>
...ure/internal/instrumentation/runtimemetrics/RuntimeMetricsBeanRegistrationExcludeFilter.java
Outdated
Show resolved
Hide resolved
import java.util.logging.Logger; | ||
|
||
/** The entry point class for runtime metrics support using JMX. */ | ||
public final class RuntimeMetrics implements Closeable { |
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.
(minor)
Having two RuntimeMetrics
classes (Java 8 and Java 17) has confused me.
Perhaps renamed this one into Java8RuntimeMetrics
?
Same comment for RuntimeMetricsBuilder
.
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.
these classes were not introduced by this PR - let's do it separately
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 PR adds RuntimeMetrics
and RuntimeMetricsBuilder
classes for Java 17. So, these class names exist both for the Java 8 and Java 17 runtime metrics implementations.
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.
ok - renamed (in #13173)
...configure/internal/instrumentation/runtimemetrics/Java17RuntimeMetricsAutoConfiguration.java
Outdated
Show resolved
Hide resolved
…/io/opentelemetry/instrumentation/spring/autoconfigure/internal/instrumentation/runtimemetrics/Java17RuntimeMetricsAutoConfiguration.java Co-authored-by: Jean Bisutti <[email protected]>
...ure/internal/instrumentation/runtimemetrics/RuntimeMetricsBeanRegistrationExcludeFilter.java
Outdated
Show resolved
Hide resolved
Closed - see #13245 |
static class OlderThanJava17 {} | ||
|
||
// GraalVM native image does not support Java 17 metrics yet | ||
@ConditionalOnProperty("org.graalvm.nativeimage.imagecode") |
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.
The Java 8 runtime metrics does not work on native mode.
What would happen is that Java8MetricsCondition
is not verified in the Spring AOT step because org.graalvm.nativeimage.imagecode
does not exist (JVM execution). The Java classes resulting from AOT may not then contain the startMetricsForJava8
bean. So, the Java native application may not also contain this bean.
We could explore solutions to detect that the AOT step is under execution or to include by default the startMetricsForJava8
in the AOT step.
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.
@zeitlinger I would suggest to go ahead with #13173 (and perhaps close this PR).
Variant of #13173