Jimdo / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
281 stars 213 forks source link

Makes available apcu stats as gauge during scrap. #73

Closed jitendra-1217 closed 5 years ago

jitendra-1217 commented 6 years ago

During each scrap, makes available apcu related stats as gauge metrics.

Following is how scrap result looks like:

# HELP apcu_avail_mem 
# TYPE apcu_avail_mem gauge
apcu_avail_mem 33521320
# HELP apcu_expunges 
# TYPE apcu_expunges gauge
apcu_expunges 0
# HELP apcu_mem_size 
# TYPE apcu_mem_size gauge
apcu_mem_size 0
# HELP apcu_memory_type 
# TYPE apcu_memory_type gauge
apcu_memory_type mmap
# HELP apcu_num_entries 
# TYPE apcu_num_entries gauge
apcu_num_entries 0
# HELP apcu_num_hits 
# TYPE apcu_num_hits gauge
apcu_num_hits 0
# HELP apcu_num_inserts 
# TYPE apcu_num_inserts gauge
apcu_num_inserts 0
# HELP apcu_num_misses 
# TYPE apcu_num_misses gauge
apcu_num_misses 0
# HELP apcu_num_seg 
# TYPE apcu_num_seg gauge
apcu_num_seg 1
# HELP apcu_num_slots 
# TYPE apcu_num_slots gauge
apcu_num_slots 4099
# HELP apcu_seg_size 
# TYPE apcu_seg_size gauge
apcu_seg_size 33554296
# HELP apcu_start_time 
# TYPE apcu_start_time gauge
apcu_start_time 1522911981
# HELP apcu_ttl 
# TYPE apcu_ttl gauge
apcu_ttl 0

Inspiration: https://github.com/tweedegolf/prometheus-client/blob/master/src/Util/ApcuStatsCreator.php

Expectation: It would be helpful in keeping track of apcu stats. We would come to know if memory is running out etcetera.

jitendra-1217 commented 6 years ago

Gentle reminder for review of this, please.

jitendra-1217 commented 5 years ago

Closing this as I do not see any reply/interest/progress on the pr.