Skip to content
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

Fix some metrics generated by prometheus client without type info #3927

Conversation

hangc0276
Copy link
Contributor

Motivation

When we get the metrics output from Prometheus, we found the metrics generated by the Prometheus client without type info, which will lead to some monitor integration systems can't parse the metrics

jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 4.0
jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 2.287
jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0
jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0
jvm_memory_direct_bytes_max{} 2.147483648E9
jvm_threads_current{} 136.0
jvm_threads_daemon{} 18.0
jvm_threads_peak{} 137.0
jvm_threads_started_total{} 415.0
jvm_threads_deadlocked{} 0.0
jvm_threads_deadlocked_monitor{} 0.0
process_cpu_seconds_total{} 740.860392
process_start_time_seconds{} 1.681901598385E9
process_open_fds{} 484.0
process_max_fds{} 10240.0
log4j2_appender_total{level="debug"} 0.0
log4j2_appender_total{level="warn"} 20.0
log4j2_appender_total{level="trace"} 0.0
log4j2_appender_total{level="error"} 3.0
log4j2_appender_total{level="fatal"} 0.0
log4j2_appender_total{level="info"} 317.0
caffeine_cache_hit_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-children"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-data"} 2.0
caffeine_cache_miss_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-children"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-data"} 2.0
caffeine_cache_requests_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-children"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-data"} 4.0
caffeine_cache_eviction_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_eviction_total{cache="bookies-racks-children"} 0.0

Changes

Write the metrics' type info to the output.

(cherry picked from commit 81037f472fb30febc5174793472e6fdbfa59f87d)
@hangc0276 hangc0276 merged commit 16282e7 into apache:master May 4, 2023
hangc0276 added a commit to streamnative/bookkeeper-achieved that referenced this pull request May 30, 2023
…ache#3927)

When we get the metrics output from Prometheus, we found the metrics generated by the Prometheus client without type info, which will lead to some monitor integration systems can't parse the metrics
```
jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 4.0
jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 2.287
jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0
jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0
jvm_memory_direct_bytes_max{} 2.147483648E9
jvm_threads_current{} 136.0
jvm_threads_daemon{} 18.0
jvm_threads_peak{} 137.0
jvm_threads_started_total{} 415.0
jvm_threads_deadlocked{} 0.0
jvm_threads_deadlocked_monitor{} 0.0
process_cpu_seconds_total{} 740.860392
process_start_time_seconds{} 1.681901598385E9
process_open_fds{} 484.0
process_max_fds{} 10240.0
log4j2_appender_total{level="debug"} 0.0
log4j2_appender_total{level="warn"} 20.0
log4j2_appender_total{level="trace"} 0.0
log4j2_appender_total{level="error"} 3.0
log4j2_appender_total{level="fatal"} 0.0
log4j2_appender_total{level="info"} 317.0
caffeine_cache_hit_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-children"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-data"} 2.0
caffeine_cache_miss_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-children"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-data"} 2.0
caffeine_cache_requests_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-children"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-data"} 4.0
caffeine_cache_eviction_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_eviction_total{cache="bookies-racks-children"} 0.0
```

Write the metrics' type info to the output.

(cherry picked from commit 16282e7)
zymap pushed a commit that referenced this pull request Jun 19, 2023
)

### Motivation
When we get the metrics output from Prometheus, we found the metrics generated by the Prometheus client without type info, which will lead to some monitor integration systems can't parse the metrics
```
jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 4.0
jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 2.287
jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0
jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0
jvm_memory_direct_bytes_max{} 2.147483648E9
jvm_threads_current{} 136.0
jvm_threads_daemon{} 18.0
jvm_threads_peak{} 137.0
jvm_threads_started_total{} 415.0
jvm_threads_deadlocked{} 0.0
jvm_threads_deadlocked_monitor{} 0.0
process_cpu_seconds_total{} 740.860392
process_start_time_seconds{} 1.681901598385E9
process_open_fds{} 484.0
process_max_fds{} 10240.0
log4j2_appender_total{level="debug"} 0.0
log4j2_appender_total{level="warn"} 20.0
log4j2_appender_total{level="trace"} 0.0
log4j2_appender_total{level="error"} 3.0
log4j2_appender_total{level="fatal"} 0.0
log4j2_appender_total{level="info"} 317.0
caffeine_cache_hit_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-children"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-data"} 2.0
caffeine_cache_miss_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-children"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-data"} 2.0
caffeine_cache_requests_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-children"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-data"} 4.0
caffeine_cache_eviction_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_eviction_total{cache="bookies-racks-children"} 0.0
```

### Changes
Write the metrics' type info to the output.

(cherry picked from commit 16282e7)
hangc0276 added a commit to hangc0276/bookkeeper that referenced this pull request Jun 26, 2023
…ache#3927)

When we get the metrics output from Prometheus, we found the metrics generated by the Prometheus client without type info, which will lead to some monitor integration systems can't parse the metrics
```
jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 4.0
jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 2.287
jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0
jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0
jvm_memory_direct_bytes_max{} 2.147483648E9
jvm_threads_current{} 136.0
jvm_threads_daemon{} 18.0
jvm_threads_peak{} 137.0
jvm_threads_started_total{} 415.0
jvm_threads_deadlocked{} 0.0
jvm_threads_deadlocked_monitor{} 0.0
process_cpu_seconds_total{} 740.860392
process_start_time_seconds{} 1.681901598385E9
process_open_fds{} 484.0
process_max_fds{} 10240.0
log4j2_appender_total{level="debug"} 0.0
log4j2_appender_total{level="warn"} 20.0
log4j2_appender_total{level="trace"} 0.0
log4j2_appender_total{level="error"} 3.0
log4j2_appender_total{level="fatal"} 0.0
log4j2_appender_total{level="info"} 317.0
caffeine_cache_hit_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-children"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-data"} 2.0
caffeine_cache_miss_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-children"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-data"} 2.0
caffeine_cache_requests_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-children"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-data"} 4.0
caffeine_cache_eviction_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_eviction_total{cache="bookies-racks-children"} 0.0
```

Write the metrics' type info to the output.

(cherry picked from commit 16282e7)
zymap pushed a commit that referenced this pull request Dec 6, 2023
)

### Motivation
When we get the metrics output from Prometheus, we found the metrics generated by the Prometheus client without type info, which will lead to some monitor integration systems can't parse the metrics
```
jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 4.0
jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 2.287
jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0
jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0
jvm_memory_direct_bytes_max{} 2.147483648E9
jvm_threads_current{} 136.0
jvm_threads_daemon{} 18.0
jvm_threads_peak{} 137.0
jvm_threads_started_total{} 415.0
jvm_threads_deadlocked{} 0.0
jvm_threads_deadlocked_monitor{} 0.0
process_cpu_seconds_total{} 740.860392
process_start_time_seconds{} 1.681901598385E9
process_open_fds{} 484.0
process_max_fds{} 10240.0
log4j2_appender_total{level="debug"} 0.0
log4j2_appender_total{level="warn"} 20.0
log4j2_appender_total{level="trace"} 0.0
log4j2_appender_total{level="error"} 3.0
log4j2_appender_total{level="fatal"} 0.0
log4j2_appender_total{level="info"} 317.0
caffeine_cache_hit_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-children"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-data"} 2.0
caffeine_cache_miss_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-children"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-data"} 2.0
caffeine_cache_requests_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-children"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-data"} 4.0
caffeine_cache_eviction_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_eviction_total{cache="bookies-racks-children"} 0.0
```

### Changes
Write the metrics' type info to the output.

(cherry picked from commit 16282e7)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
…ache#3927)

### Motivation
When we get the metrics output from Prometheus, we found the metrics generated by the Prometheus client without type info, which will lead to some monitor integration systems can't parse the metrics
```
jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 4.0
jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 2.287
jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0
jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0
jvm_memory_direct_bytes_max{} 2.147483648E9
jvm_threads_current{} 136.0
jvm_threads_daemon{} 18.0
jvm_threads_peak{} 137.0
jvm_threads_started_total{} 415.0
jvm_threads_deadlocked{} 0.0
jvm_threads_deadlocked_monitor{} 0.0
process_cpu_seconds_total{} 740.860392
process_start_time_seconds{} 1.681901598385E9
process_open_fds{} 484.0
process_max_fds{} 10240.0
log4j2_appender_total{level="debug"} 0.0
log4j2_appender_total{level="warn"} 20.0
log4j2_appender_total{level="trace"} 0.0
log4j2_appender_total{level="error"} 3.0
log4j2_appender_total{level="fatal"} 0.0
log4j2_appender_total{level="info"} 317.0
caffeine_cache_hit_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-children"} 0.0
caffeine_cache_hit_total{cache="bookies-racks-data"} 2.0
caffeine_cache_miss_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-children"} 0.0
caffeine_cache_miss_total{cache="bookies-racks-data"} 2.0
caffeine_cache_requests_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-children"} 0.0
caffeine_cache_requests_total{cache="bookies-racks-data"} 4.0
caffeine_cache_eviction_total{cache="bookies-racks-exists"} 0.0
caffeine_cache_eviction_total{cache="bookies-racks-children"} 0.0
```

### Changes
Write the metrics' type info to the output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants