You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can find an example of authentication and SSL in the [jmx_exporter](https://github.com/prometheus/jmx_exporter). <!-- editorconfig-checker-disable-line -->
36
+
You can find an example of authentication and SSL in the
Copy file name to clipboardExpand all lines: docs/content/getting-started/metric-types.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,8 @@ the Prometheus server.
84
84
format and ingest both, the classic and the native flavor. This is great for migrating from
85
85
classic histograms to native histograms.
86
86
87
-
See [examples/example-native-histogram](https://github.com/prometheus/client_java/tree/1.0.x/examples/example-native-histogram) for an example.
87
+
See [examples/example-native-histogram](https://github.com/prometheus/client_java/tree/1.0.x/examples/example-native-histogram)<!-- editorconfig-checker-disable-line -->
or [nativeOnly()](</client_java/api/io/prometheus/metrics/core/metrics/Histogram.Builder.html#nativeOnly()>),
57
+
or [nativeOnly()](</client_java/api/io/prometheus/metrics/core/metrics/Histogram.Builder.html#nativeOnly()>),<!-- editorconfig-checker-disable-line -->
58
58
or you use the corresponding [config options]({{< relref "../config/config.md" >}}).
59
59
60
60
One way to do this is with system properties in the command line when you start your application
Copy file name to clipboardExpand all lines: docs/content/instrumentation/jvm.md
+33-22Lines changed: 33 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,9 @@ register all JVM metrics, you can register each of these classes individually ra
44
44
## JVM Buffer Pool Metrics
45
45
46
46
JVM buffer pool metrics are provided by
47
-
the [JvmBufferPoolMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmBufferPoolMetrics.html)
47
+
the [JvmBufferPoolMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmBufferPoolMetrics.html)<!-- editorconfig-checker-disable-line -->
48
48
class. The data is coming from
49
-
the [BufferPoolMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/BufferPoolMXBean.html).
49
+
the [BufferPoolMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/BufferPoolMXBean.html).<!-- editorconfig-checker-disable-line -->
the [JvmClassLoadingMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmClassLoadingMetrics.html)
70
+
the [JvmClassLoadingMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmClassLoadingMetrics.html)<!-- editorconfig-checker-disable-line -->
71
71
class. The data is coming from
72
-
the [ClassLoadingMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/ClassLoadingMXBean.html).
72
+
the [ClassLoadingMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/ClassLoadingMXBean.html).<!-- editorconfig-checker-disable-line -->
73
73
Example metrics:
74
74
75
+
<!-- editorconfig-checker-disable -->
75
76
```text
76
77
# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM
the [JvmCompilationMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmCompilationMetrics.html)
92
+
the [JvmCompilationMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmCompilationMetrics.html)<!-- editorconfig-checker-disable-line -->
91
93
class. The data is coming from
92
-
the [CompilationMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/CompilationMXBean.html).
94
+
the [CompilationMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/CompilationMXBean.html).<!-- editorconfig-checker-disable-line -->
93
95
Example metrics:
94
96
97
+
<!-- editorconfig-checker-disable -->
95
98
```text
96
99
# HELP jvm_compilation_time_seconds_total The total time in seconds taken for HotSpot class compilation
97
100
# TYPE jvm_compilation_time_seconds_total counter
98
101
jvm_compilation_time_seconds_total 0.152
99
102
```
103
+
<!-- editorconfig-checker-enable -->
100
104
101
105
## JVM Garbage Collector Metrics
102
106
103
107
JVM garbage collector metrics are provided by
104
-
the [JvmGarbageCollectorMetric](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmGarbageCollectorMetrics.html)
108
+
the [JvmGarbageCollectorMetric](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmGarbageCollectorMetrics.html)<!-- editorconfig-checker-disable-line -->
105
109
class. The data is coming from
106
-
the [GarbageCollectorMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/GarbageCollectorMXBean.html).
110
+
the [GarbageCollectorMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/GarbageCollectorMXBean.html).<!-- editorconfig-checker-disable-line -->
the [JvmMemoryMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmMemoryMetrics.html)
125
+
the [JvmMemoryMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmMemoryMetrics.html)<!-- editorconfig-checker-disable-line -->
122
126
class. The data is coming from
123
-
the [MemoryMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/MemoryMXBean.html)
124
-
and
125
-
the [MemoryPoolMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html).
127
+
the [MemoryMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/MemoryMXBean.html)<!-- editorconfig-checker-disable-line -->
128
+
and the [MemoryPoolMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html). <!-- editorconfig-checker-disable-line -->
126
129
Example metrics:
127
130
131
+
<!-- editorconfig-checker-disable -->
128
132
```text
129
133
# HELP jvm_memory_committed_bytes Committed (bytes) of a given JVM memory area.
JVM memory pool allocation metrics are provided by
205
-
the [JvmMemoryPoolAllocationMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmMemoryPoolAllocationMetrics.html)
211
+
the [JvmMemoryPoolAllocationMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmMemoryPoolAllocationMetrics.html)<!-- editorconfig-checker-disable-line -->
206
212
class. The data is obtained by adding
207
-
a [NotificationListener](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/javax/management/NotificationListener.html)
208
-
to
209
-
the [GarbageCollectorMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/GarbageCollectorMXBean.html).
213
+
a [NotificationListener](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/javax/management/NotificationListener.html)<!-- editorconfig-checker-disable-line -->
214
+
to the [GarbageCollectorMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/GarbageCollectorMXBean.html). <!-- editorconfig-checker-disable-line -->
210
215
Example metrics:
211
216
217
+
<!-- editorconfig-checker-disable -->
212
218
```text
213
219
# HELP jvm_memory_pool_allocated_bytes_total Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously.
214
220
# TYPE jvm_memory_pool_allocated_bytes_total counter
@@ -219,28 +225,32 @@ jvm_memory_pool_allocated_bytes_total{pool="PS Eden Space"} 1.79232824E8
219
225
jvm_memory_pool_allocated_bytes_total{pool="PS Old Gen"} 1428888.0
the [JvmRuntimeInfoMetric](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmRuntimeInfoMetric.html)
233
+
the [JvmRuntimeInfoMetric](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmRuntimeInfoMetric.html)<!-- editorconfig-checker-disable-line -->
227
234
class. The data is obtained via system properties and will not change throughout the lifetime of the
the [JvmThreadsMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetrics.html)
248
+
the [JvmThreadsMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetrics.html)<!-- editorconfig-checker-disable-line -->
240
249
class. The data is coming from
241
-
the [ThreadMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/ThreadMXBean.html).
250
+
the [ThreadMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/ThreadMXBean.html).<!-- editorconfig-checker-disable-line -->
242
251
Example metrics:
243
252
253
+
<!-- editorconfig-checker-disable -->
244
254
```text
245
255
# HELP jvm_threads_current Current thread count of a JVM
the [ProcessMetrics](/client_java/api/io/prometheus/metrics/instrumentation/jvm/ProcessMetrics.html)
278
289
class. The data is coming from
279
-
the [OperatingSystemMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html),
280
-
the [RuntimeMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/RuntimeMXBean.html),
290
+
the [OperatingSystemMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html),<!-- editorconfig-checker-disable-line -->
291
+
the [RuntimeMXBean](https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/RuntimeMXBean.html),<!-- editorconfig-checker-disable-line -->
281
292
and from the `/proc/self/status` file on Linux. The metrics with prefix `process_` are not specific
282
293
to Java, but should be provided by every Prometheus client library,
283
294
see [Process Metrics](https://prometheus.io/docs/instrumenting/writing_clientlibs/#process-metrics)
Copy file name to clipboardExpand all lines: docs/content/internals/model.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,9 @@ The illustration below shows the internal architecture of the Prometheus Java cl
10
10
## prometheus-metrics-core
11
11
12
12
This is the user facing metrics library, implementing the core metric types,
13
-
like [Counter](/client_java/api/io/prometheus/metrics/core/metrics/Counter.html), [Gauge](/client_java/api/io/prometheus/metrics/core/metrics/Gauge.html)[Histogram](/client_java/api/io/prometheus/metrics/core/metrics/Histogram.html),
13
+
like [Counter](/client_java/api/io/prometheus/metrics/core/metrics/Counter.html),
0 commit comments