Topik ini menjelaskan metrik umum dalam Pemantauan Aplikasi ARMS. Anda dapat menggunakan metrik tersebut untuk membuat Dasbor Grafana kustom.
Aplikasi yang terhubung melalui Managed Service for OpenTelemetry hanya mendukung metrik bisnis. Metrik lain, seperti metrik JVM dan metrik sistem, tidak didukung.
Metrik bisnis
Dimensi umum
Nama dimensi | Kunci dimensi |
Nama layanan | service |
PID layanan | pid |
IP mesin | serverIp |
Antarmuka | rpc |
Daftar metrik
Semua jenis akses mencakup metrik berikut. Saat menjalankan kueri, ganti $callType dengan jenis akses tertentu. Untuk informasi selengkapnya tentang jenis akses, lihat Jenis akses layanan dan dimensi yang tersedia.
Sebagai contoh, untuk mengkueri jumlah permintaan untuk layanan HTTP, ubah arms_$callType_requests_count menjadi arms_http_requests_count.
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan | Unit | Dimensi |
Jumlah permintaan | arms_$callType_requests_count | Gauge | 15 s | Tidak ada | Dimensi bervariasi berdasarkan jenis akses layanan. Untuk informasi selengkapnya, lihat Jenis akses layanan dan dimensi yang tersedia. |
Jumlah permintaan error | arms_$callType_requests_error_count | Gauge | 15 s | Tidak ada | |
Durasi permintaan | arms_$callType_requests_seconds | Gauge | 15 s | Detik | |
Jumlah permintaan lambat | arms_$callType_requests_slow_count | Gauge | 15 s | Tidak ada | |
Request duration quantiles | arms_$callType_requests_latency_seconds | Summary | 15 s | Detik | Dimensi ini hanya tersedia ketika jenis akses layanan adalah HTTP dan statistik kuantil diaktifkan. Untuk mengaktifkan statistik kuantil, lihat Advanced Settings. Dimensi kuantil:
|
Kecuali untuk metrik kuantil, semua metrik di atas bertipe Gauge. Artinya, nilai setiap titik data merepresentasikan total kumulatif dalam interval pengumpulan. Hal ini berbeda dari metrik yang dihasilkan oleh framework open source. Sebagai contoh, untuk menghitung rata-rata queries per second (QPS) selama satu menit, ekspresi Prometheus Query Language (PromQL) untuk metrik ARMS adalah sum_over_time(arms_$callType_requests_count[1m])/60. Untuk framework open source, ekspresinya biasanya rate(http_server_requests_count[1m]).
Deskripsi instans penyimpanan metrik
Metrik bisnis disimpan di pustaka metrik detail (metricstore-apm-metrics-detail).
Metrik bisnis agregat
Metrik bisnis membuat metrik terpisah untuk setiap jenis panggilan. Hal ini menyebabkan ekspresi PromQL menjadi panjang dan kompleks ketika satu aplikasi memiliki beberapa jenis panggilan, seperti HTTP dan Dubbo.
Metrik bisnis mencatat semua dimensi pengamatan. Namun, tidak semua dimensi diperlukan dalam beberapa skenario statistik, sehingga performa kueri langsung terhadap metrik bisnis menjadi buruk dalam kasus tertentu.
Untuk mengatasi masalah tersebut, ARMS menyediakan metrik bisnis agregat.
Deskripsi metrik
Metrik bisnis agregat diklasifikasikan ke dalam kategori berikut:
General
Mencatat jumlah permintaan, jumlah error, jumlah permintaan lambat, dan durasi rata-rata permintaan untuk semua jenis akses.
Database
Mencatat jumlah permintaan, jumlah error, jumlah permintaan lambat, dan durasi rata-rata permintaan untuk jenis akses database.
SQL class
Mencatat jumlah permintaan, jumlah error, jumlah permintaan lambat, dan durasi rata-rata permintaan untuk jenis akses database. Dibandingkan dengan kategori Database, kategori ini menambahkan dimensi SQL.
Exception
Mencatat jumlah permintaan dan durasi rata-rata permintaan untuk semua jenis akses saat terjadi exception.
Status code
Mencatat jumlah permintaan untuk berbagai kode status dalam skenario HTTP.
Quantile
Mencatat kuantil durasi permintaan untuk semua jenis akses.
Kecuali untuk kategori Quantile, setiap kategori utama memiliki dua jenis metrik. Yang pertama adalah metrik agregat normal, dinamai dalam format xxx_raw. Yang kedua adalah metrik berdimensi tereduksi, dinamai dalam format xxx_ign_x_y, di mana x dan y adalah dimensi yang dikecualikan dari metrik tersebut.
Jenis metrik dan interval pengumpulan
Kecuali dinyatakan lain, semua metrik bisnis agregat bertipe Gauge dengan interval pengumpulan 15 detik.
Dimensi umum
Dimensi berikut ada di setiap metrik agregat:
Dimensi | Deskripsi |
pid | PID aplikasi |
service | Nama aplikasi |
serverIp | IP instans |
source | Sumber metrik:
|
Daftar metrik
Kategori metrik | Nama metrik | Metrik | Unit | Dimensi lainnya |
General | Jumlah permintaan | arms_app_requests_count_raw | Unit |
|
arms_app_requests_count_ign_destid_endpoint_parent_ppid_prpc_rpc | Unit | Excludes the destId, endpoint, parent, ppid, prpc, and rpc dimensions. | ||
arms_app_requests_count_ign_destid_endpoint_rpc_prpc | Unit | Excludes the destId, endpoint, rpc, and prpc dimensions. | ||
arms_app_requests_count_ign_destid_endpoint_parent_ppid_prpc | Item | Excludes the destId, endpoint, parent, ppid, and prpc dimensions. | ||
arms_app_requests_count_ign_parent_ppid_prpc_rpc | Unit | Excludes the parent, ppid, prpc, and rpc dimensions. | ||
Jumlah permintaan error | arms_app_requests_error_count_raw | item |
| |
arms_app_requests_error_count_ign_destid_endpoint_rpc_prpc | Unit | Excludes the destId, endpoint, rpc, and prpc dimensions. | ||
arms_app_requests_error_count_ign_destid_endpoint_parent_ppid_prpc | Unit | Excludes the destId, endpoint, parent, ppid, and prpc dimensions. | ||
arms_app_requests_error_count_ign_parent_ppid_prpc_rpc | Unit | Excludes the parent, ppid, prpc, and rpc dimensions. | ||
arms_app_requests_error_count_ign_parent_ppid_prpc_rpc | Jumlah | Excludes the parent, ppid, prpc, and rpc dimensions. | ||
Jumlah permintaan lambat | arms_app_requests_slow_count_raw | unit |
| |
arms_app_requests_slow_count_ign_destid_endpoint_parent_ppid_prpc_rpc | Item | Excludes the destId, endpoint, parent, ppid, prpc, and rpc dimensions. | ||
arms_app_requests_slow_count_ign_destid_endpoint_rpc_prpc | Unit | Excludes the destId, endpoint, rpc, and prpc dimensions. | ||
arms_app_requests_slow_count_ign_destid_endpoint_parent_ppid_prpc | Item | Excludes the destId, endpoint, parent, ppid, and prpc dimensions. | ||
arms_app_requests_slow_count_ign_parent_ppid_prpc_rpc | Item | Excludes the parent, ppid, prpc, and rpc dimensions. | ||
Durasi permintaan | arms_app_requests_seconds_raw | Detik |
| |
arms_app_requests_seconds_ign_destid_endpoint_parent_ppid_prpc_rpc | Seconds | Excludes the destId, endpoint, parent, ppid, prpc, and rpc dimensions. | ||
arms_app_requests_seconds_ign_destid_endpoint_rpc_prpc | Seconds | Excludes the destId, endpoint, rpc, and prpc dimensions. | ||
arms_app_requests_seconds_ign_destid_endpoint_parent_ppid_prpc | Seconds | Excludes the destId, endpoint, parent, ppid, and prpc dimensions. | ||
arms_app_requests_seconds_ign_parent_ppid_prpc_rpc | Seconds | Excludes the parent, ppid, prpc, and rpc dimensions. | ||
Database | Jumlah permintaan database | arms_db_requests_count_raw | Unit |
|
arms_db_requests_count_ign_rpc | Item | Excludes the interface dimension. | ||
Database request error count | arms_db_requests_error_count_raw | Unit |
| |
arms_db_requests_error_count_ign_rpc | Unit | Excludes the interface dimension. | ||
Jumlah permintaan lambat database | arms_db_requests_slow_count_raw | Item |
| |
arms_db_requests_slow_count_ign_rpc | Jumlah | Excludes the interface dimension. | ||
Durasi permintaan database | arms_db_requests_seconds_raw | Detik |
| |
arms_db_requests_seconds_ign_rpc | Detik | Excludes the interface dimension. | ||
SQL Class | Jumlah permintaan SQL | arms_sql_requests_count_raw |
| |
arms_sql_requests_count_ign_rpc | Excludes the interface dimension. | |||
SQL request error count | arms_sql_requests_error_count_raw | Unit |
| |
arms_sql_requests_error_count_ign_rpc | Item | Excludes the interface dimension. | ||
Jumlah permintaan lambat SQL | arms_sql_requests_slow_count_raw | Jumlah |
| |
arms_sql_requests_slow_count_ign_rpc | Unit | Excludes the interface dimension. | ||
Durasi permintaan SQL | arms_sql_requests_seconds_raw | Detik |
| |
arms_sql_requests_seconds_ign_rpc | Detik | Excludes the interface dimension. | ||
Exception | Jumlah permintaan pengecualian | arms_exception_requests_count_raw | Item |
|
arms_exception_requests_count_ign_destid_endpoint_rpc | Unit | Excludes the destid, endpoint, and rpc dimensions. | ||
arms_exception_requests_count_ign_destid_endpoint | Unit | Excludes the destid and endpoint dimensions. | ||
Durasi permintaan pengecualian | arms_exception_requests_seconds_raw | Detik |
| |
arms_exception_requests_seconds_ign_destid_endpoint_rpc | Seconds | Excludes the destid, endpoint, and rpc dimensions. | ||
arms_exception_requests_seconds_ign_destid_endpoint | Seconds | Excludes the destid and endpoint dimensions. | ||
Status code | Jumlah permintaan berdasarkan kode status | arms_requests_by_status_count_raw | Count |
|
arms_requests_by_status_count_ign_rpc | Item | Excludes the interface dimension. | ||
Quantile | Request duration quantiles Catatan Didukung oleh agent V4.x dan yang lebih baru. | arms_uni_requests_latency_seconds |
|
Contoh penggunaan
Cara memilih metrik untuk menghitung jumlah permintaan semua antarmuka aplikasi menggunakan PromQL
Temukan metrik yang menyediakan jumlah permintaan untuk antarmuka. Kategori General dari metrik memenuhi persyaratan ini.
Hasil statistik hanya memerlukan dimensi antarmuka. Dimensi lain, seperti antarmuka hulu, aplikasi hulu, dan alamat remote, tidak diperlukan. Saat memilih metrik tertentu, pastikan metrik tersebut mencakup dimensi antarmuka dan sesedikit mungkin dimensi lainnya.
Berdasarkan analisis di atas, metrik optimal adalah arms_app_requests_count_ign_destid_endpoint_parent_ppid_prpc.
Deskripsi instans penyimpanan metrik
Metrik berikut disimpan di pustaka metrik inti (metricstore-apm-metrics):
arms_app_requests_{metric}_ign_destid_endpoint_parent_ppid_prpc_rpc
arms_app_requests_{metric}_ign_destid_endpoint_rpc_prpc
arms_app_requests_{metric}_ign_destid_endpoint_parent_ppid_prpc
Metrik bisnis agregat lainnya disimpan di pustaka metrik detail (metricstore-apm-metrics-detail).
Metrik JVM
Dimensi umum
Nama dimensi | Kunci dimensi |
Nama layanan | service |
PID layanan | pid |
IP mesin | serverIp |
Daftar metrik
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan | Unit | Dimensi |
Total GC count | arms_jvm_gc_total | Counter | 15 s | Tidak ada | Generational GC area:
Cause (GC cause) (didukung oleh agent V4.4.0 dan yang lebih baru): System.gc(), Heap Dump Initiated GC, Allocation Failure, dan lainnya. |
Total GC duration | arms_jvm_gc_seconds_total | Counter | 15 s | Detik | |
GC count per interval | arms_jvm_gc_delta | Gauge | 15 s | Tidak ada | |
GC duration per interval | arms_jvm_gc_seconds_delta | Gauge | 15 s | Detik | |
Jumlah thread JVM | arms_jvm_threads_count | Gauge | 15 s | Tidak ada | State (thread state):
|
Initial size of the JVM memory region | arms_jvm_mem_init_bytes | Gauge | 15 s | Bait | Area:
ID (region breakdown):
|
Maximum size of the JVM memory region | arms_jvm_mem_max_bytes | Gauge | 15 s | Byte | |
Used size of the JVM memory region | arms_jvm_mem_used_bytes | Gauge | 15 s | Byte | |
Committed size of the JVM memory region | arms_jvm_mem_committed_bytes | Gauge | 15 s | Byte | |
Usage ratio of the JVM memory region | arms_jvm_mem_usage_ratio | Gauge | 15 s | Ratio (0 to 1) | |
Kelas yang dimuat JVM | arms_class_load_loaded | Counter | 15 s | Tidak ada | Tidak ada |
Kelas yang tidak dimuat JVM | arms_class_load_un_loaded | Counter | 15 s | Tidak ada | Tidak ada |
Ukuran kolam buffer JVM | arms_jvm_buffer_pool_total_bytes | Gauge | 15 s | Bytes | ID (region):
|
Used size of the JVM buffer pool | arms_jvm_buffer_pool_used_bytes | Gauge | 15 s | Bytes | |
Number of JVM buffer pools | arms_jvm_buffer_pool_count | Gauge | 15 s | Tidak ada | |
Number of open file descriptors | arms_file_desc_open_count | Gauge | 15 s | Tidak ada | Tidak ada |
Ratio of open file descriptors (open/maximum allowed) | arms_file_desc_open_ratio | Gauge | 15 s | Ratio (0 to 1) | Tidak ada |
Deskripsi instans penyimpanan metrik
Metrik JVM disimpan di pustaka metrik inti (metricstore-apm-metrics).
Metrik sistem
Dimensi umum
Nama dimensi | Kunci dimensi |
Nama layanan | service |
PID layanan | pid |
IP mesin | serverIp |
Daftar metrik
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan | Unit |
CPU idle percentage | arms_system_cpu_idle | Gauge | 15 s | Persentase |
CPU I/O wait percentage | arms_system_cpu_io_wait | Gauge | 15 s | Persentase |
CPU system percentage | arms_system_cpu_system | Gauge | 15 s | Persentase |
CPU user percentage | arms_system_cpu_user | Gauge | 15 s | Persentase |
Beban sistem (1 menit) | arms_system_load | Gauge | 15 s | Tidak ada |
Free disk space | arms_system_disk_free_bytes | Gauge | 15 s | Bytes |
Total disk space | arms_system_disk_total_bytes | Gauge | 15 s | Bytes |
Penggunaan disk | arms_system_disk_used_ratio | Gauge | 15 s | Ratio (0 to 1) |
Ukuran buffer memori | arms_system_mem_buffers_bytes | Gauge | 15 s | Byte |
Ukuran cache memori | arms_system_mem_cached_bytes | Gauge | 15 s | Bytes |
Free memory size | arms_system_mem_free_bytes | Gauge | 15 s | Byte |
Free swap memory size | arms_system_mem_swap_free_bytes | Gauge | 15 s | Bytes |
Swap memory size | arms_system_mem_swap_total_bytes | Gauge | 15 s | Byte |
Ukuran memori | arms_system_mem_total_bytes | Gauge | 15 s | Byte |
Ukuran memori yang digunakan | arms_system_mem_used_bytes | Gauge | 15 s | Byte |
Inbound network traffic size | arms_system_net_in_bytes | Gauge | 15 s | Byte |
Outbound network traffic size | arms_system_net_out_bytes | Gauge | 15 s | Byte |
Inbound network errors | arms_system_net_in_err | Gauge | 15 s | Tidak ada |
Outbound network errors | arms_system_net_out_err | Gauge | 15 s | Tidak ada |
Deskripsi instans penyimpanan metrik
Metrik sistem disimpan di pustaka metrik inti (metricstore-apm-metrics).
Metrik kolam thread/kolam koneksi
Dimensi umum
Nama dimensi | Kunci dimensi |
Nama layanan | service |
PID layanan | pid |
IP mesin | serverIp |
Thread pool name (didukung oleh versi agent sebelum 4.1.x) | name |
Thread pool type (didukung oleh versi agent sebelum 4.1.x) | type |
Daftar metrik
Versi agent 4.1.x dan yang lebih baru
Metrik kolam thread
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan | Dimensi |
Jumlah thread inti | arms_thread_pool_core_pool_size | Gauge | 15 s |
|
Jumlah maksimum thread | arms_thread_pool_max_pool_size | Gauge | 15 s |
|
Jumlah thread aktif | arms_thread_pool_active_thread_count | Gauge | 15 s |
|
Jumlah thread saat ini | arms_thread_pool_current_thread_count | Gauge | 15 s |
|
Peak thread count in the thread pool (the highest number of threads since the pool was created) | arms_thread_pool_max_thread_count | Gauge | 15 s |
|
Scheduled task count | arms_thread_pool_scheduled_task_count | Counter | 15 s |
|
Completed task count | arms_thread_pool_completed_task_count | Counter | 15 s |
|
Rejected task count | arms_thread_pool_rejected_task_count | Counter | 15 s |
|
Task queue size | arms_thread_pool_queue_size | Gauge | 15 s |
|
Metrik kolam koneksi
Deskripsi metrik | Nama metrik | Jenis metrik | Interval pengumpulan | Dimensi |
Connections | arms_connection_pool_connection_count | Gauge | 15 s |
|
Minimum idle connections | arms_connection_pool_connection_min_idle_count | Gauge | 15 s |
|
Maximum idle connections | arms_connection_pool_connection_max_idle_count | Gauge | 15 s |
|
Koneksi maksimum | arms_connection_pool_connection_max_count | Gauge | 15 s |
|
Pending connection requests | arms_connection_pool_pending_request_count | Counter | 15 s |
|
Versi agent sebelum 4.1.x
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan | Dimensi |
Thread pool core size | arms_threadpool_core_size | Gauge | 15 s | Tidak ada |
Thread pool maximum size | arms_threadpool_max_size | Gauge | 15 s | Tidak ada |
Thread pool active size | arms_threadpool_active_size | Gauge | 15 s | Tidak ada |
Ukuran antrian kolam thread | arms_threadpool_queue_size | Gauge | 15 s | Tidak ada |
Ukuran saat ini kolam thread | arms_threadpool_current_size | Gauge | 15 s | Tidak ada |
Number of tasks in different states in the thread pool | arms_threadpool_task_total | Gauge | 15 s | Status (task state):
|
Deskripsi instans penyimpanan metrik
Metrik kolam thread dan kolam koneksi disimpan di pustaka metrik inti (metricstore-apm-metrics).
Metrik tugas terjadwal
Metrik berikut hanya tersedia untuk tugas terjadwal.
Dimensi umum
Nama dimensi | Kunci dimensi |
Nama layanan | service |
PID layanan | pid |
IP mesin | serverIp |
ID tugas | rpc |
Daftar metrik
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan | Unit |
Keterlambatan penjadwalan | arms_$callType_delay_milliseconds | Gauge | 15 s | ms |
Deskripsi instans penyimpanan metrik
Metrik tugas terjadwal disimpan di pustaka metrik detail (metricstore-apm-metrics-detail).
Metrik runtime Go
Daftar metrik
Nama metrik | Metrik | Jenis metrik | Interval pengumpulan |
Application uptime (ms) | arms_golang_runtime_uptime | Int64Counter | 15 s |
Number of goroutines in the current application | arms_golang_process_runtime_go_goroutines | Gauge | 15 s |
Memori objek heap (byte) | arms_golang_process_runtime_go_mem_heap_alloc | Gauge | 15 s |
Memori heap yang tidak dialokasikan atau diklaim kembali | arms_golang_process_runtime_go_mem_heap_idle | Gauge | 15 s |
Memori heap yang digunakan | arms_golang_process_runtime_go_mem_heap_inuse | Gauge | 15 s |
Allocated and live heap objects | arms_golang_process_runtime_go_mem_heap_objects | Gauge | 15 s |
Memory in HeapIdle that has been released to the operating system | arms_golang_process_runtime_go_mem_heap_released | Gauge | 15 s |
Size of virtual memory requested from the system | arms_golang_process_runtime_go_mem_heap_sys | Gauge | 15 s |
Number of current live objects | arms_golang_process_runtime_go_mem_live_objects | Gauge | 15 s |
Number of GC cycles since the program started | arms_golang_process_runtime_go_gc_count | Gauge | 15 s |
Cumulative stop-the-world garbage collection pause time, which is the unavailable time | arms_golang_process_runtime_go_gc_pause_total_ns | Int64Counter | 15 s |
GC pause time distribution | arms_golang_process_runtime_go_gc_pause_ns | Int64Histogram | 15 s |
Deskripsi instans penyimpanan metrik
Metrik runtime Go disimpan di pustaka metrik inti (metricstore-apm-metrics).
Jenis akses layanan dan dimensi yang tersedia
Jenis sisi klien
Jenis akses
http_client
dubbo_client
hsf_client
dsf_client
notify_client
grpc_client
thrift_client
sofa_client
mq_client
kafka_client
Dimensi
parent: Nama layanan hulu
ppid: PID layanan hulu
destId: Extended information about the request peer
endpoint: Alamat peer permintaan
excepType: ID pengecualian
excepInfo: Aturan pengkodean ID pengecualian
excepName: Nama pengecualian
stackTraceId: Stack trace ID
Jenis DB
Jenis akses
mysql
oracle
mariadb
postgresql
ppas
sqlserver
mongodb
dmdb
Dimensi
parent: Nama layanan hulu
ppid: PID layanan hulu
destId: Nama database
endpoint: Alamat database
excepType: ID pengecualian
excepInfo: Aturan pengkodean ID pengecualian
excepName: Nama pengecualian
stackTraceId: Stack trace ID
sqlId: ID pernyataan SQL
Jenis sisi server
Jenis akses
http
dubbo
hsf
dsf
user_method
mq
kafka
grpc
thrift
sofa
Dimensi
prpc: Antarmuka hulu
parent: Nama layanan hulu
ppid: PID layanan hulu
Endpoint: The address of the service.
excepType: ID pengecualian
excepInfo: Aturan pengkodean ID pengecualian
excepName: Nama pengecualian
stackTraceId: Stack trace ID
Jenis tugas terjadwal
Jenis akses
xxl_job
spring_scheduled
quartz
elasticjob
jdk_timer
schedulerx
Dimensi
prpc: Antarmuka hulu
parent: Nama layanan hulu
ppid: PID layanan hulu
excepType: ID pengecualian
excepInfo: Aturan pengkodean ID pengecualian
excepName: Nama pengecualian
stackTraceId: Stack trace ID