Skip to content

Commit

Permalink
Properly include Prometheus related code
Browse files Browse the repository at this point in the history
The way the test was being done previously
was checking the build time classpath instead
of the runtime class for the presence of the
Prometheus Registry.

Fixes: #33547
(cherry picked from commit a42d2de)
  • Loading branch information
geoand authored and gsmet committed May 23, 2023
1 parent 14bff62 commit ba54a59
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public static class PrometheusEnabled implements BooleanSupplier {
MicrometerConfig mConfig;

public boolean getAsBoolean() {
return REGISTRY_CLASS != null && mConfig.checkRegistryEnabledWithDefault(mConfig.export.prometheus);
return (REGISTRY_CLASS != null) && QuarkusClassLoader.isClassPresentAtRuntime(REGISTRY_CLASS_NAME)
&& mConfig.checkRegistryEnabledWithDefault(mConfig.export.prometheus);
}
}

Expand Down

0 comments on commit ba54a59

Please sign in to comment.