Class JvmClassLoadingMetrics
java.lang.Object
io.prometheus.metrics.instrumentation.jvm.JvmClassLoadingMetrics
JVM Class Loading metrics. The
JvmClassLoadingMetrics are registered as part of the
JvmMetrics like this:
JvmMetrics.builder().register();
However, if you want only the JvmClassLoadingMetrics you can also register them directly:
JvmClassLoadingMetrics.builder().register();
Example metrics being exported:
# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM # TYPE jvm_classes_currently_loaded gauge jvm_classes_currently_loaded 1109.0 # HELP jvm_classes_loaded_total The total number of classes that have been loaded since the JVM has started execution # TYPE jvm_classes_loaded_total counter jvm_classes_loaded_total 1109.0 # HELP jvm_classes_unloaded_total The total number of classes that have been unloaded since the JVM has started execution # TYPE jvm_classes_unloaded_total counter jvm_classes_unloaded_total 0.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassLoadingMXBeanprivate final PrometheusPropertiesprivate final Labelsprivate static final Stringprivate static final Stringprivate static final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateJvmClassLoadingMetrics(ClassLoadingMXBean classLoadingBean, PrometheusProperties config, Labels constLabels) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(PrometheusProperties config) private voidregister(PrometheusRegistry registry)
-
Field Details
-
JVM_CLASSES_CURRENTLY_LOADED
- See Also:
-
JVM_CLASSES_LOADED_TOTAL
- See Also:
-
JVM_CLASSES_UNLOADED_TOTAL
- See Also:
-
config
-
classLoadingBean
-
constLabels
-
-
Constructor Details
-
JvmClassLoadingMetrics
private JvmClassLoadingMetrics(ClassLoadingMXBean classLoadingBean, PrometheusProperties config, Labels constLabels)
-
-
Method Details
-
register
-
builder
-
builder
-