Class JvmGarbageCollectorMetrics
java.lang.Object
io.prometheus.metrics.instrumentation.jvm.JvmGarbageCollectorMetrics
JVM Garbage Collector metrics. The
JvmGarbageCollectorMetrics are registered as part of
the JvmMetrics like this:
JvmMetrics.builder().register();
However, if you want only the JvmGarbageCollectorMetrics you can also register them
directly:
JvmGarbageCollectorMetrics.builder().register();
Example metrics being exported:
# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds.
# TYPE jvm_gc_collection_seconds summary
jvm_gc_collection_seconds_count{gc="PS MarkSweep"} 0
jvm_gc_collection_seconds_sum{gc="PS MarkSweep"} 0.0
jvm_gc_collection_seconds_count{gc="PS Scavenge"} 0
jvm_gc_collection_seconds_sum{gc="PS Scavenge"} 0.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PrometheusPropertiesprivate final Labelsprivate final List<GarbageCollectorMXBean>private static final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateJvmGarbageCollectorMetrics(List<GarbageCollectorMXBean> garbageCollectorBeans, PrometheusProperties config, Labels constLabels) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(PrometheusProperties config) private voidregister(PrometheusRegistry registry)
-
Field Details
-
JVM_GC_COLLECTION_SECONDS
- See Also:
-
config
-
garbageCollectorBeans
-
constLabels
-
-
Constructor Details
-
JvmGarbageCollectorMetrics
private JvmGarbageCollectorMetrics(List<GarbageCollectorMXBean> garbageCollectorBeans, PrometheusProperties config, Labels constLabels)
-
-
Method Details
-
register
-
builder
-
builder
-