Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sui-proxy/ add metrics for service] (MystenLabs#10219)
Summary: * we don't have many (only one) metrics for the proxy service itself * add several metrics to track queue pressure and http related items Test Plan: local testing ``` # HELP uptime uptime of the node service in seconds # TYPE uptime counter uptime{version="0.0.2-DIRTY"} 3 # HELP consumer_operations Operations counters and status from operations performed in the consumer. # TYPE consumer_operations counter consumer_operations{operation="check_response",status="OK"} 8 consumer_operations{operation="encode_compress",status="success"} 8 # HELP histogram_relay_pressure Number of metric families submitted, exported, overflowed to/from the queue. # TYPE histogram_relay_pressure counter histogram_relay_pressure{histogram_relay="submit"} 2 histogram_relay_pressure{histogram_relay="submitted"} 586 # HELP histogram_submit_duration_seconds The submit fn latencies in seconds. # TYPE histogram_submit_duration_seconds histogram histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.005"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.01"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.025"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.05"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.1"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.25"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="0.5"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="1"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="2.5"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="5"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="10"} 2 histogram_submit_duration_seconds_bucket{histogram_relay="submit",le="+Inf"} 2 histogram_submit_duration_seconds_sum{histogram_relay="submit"} 0.000036416 histogram_submit_duration_seconds_count{histogram_relay="submit"} 2 # HELP http_handler_duration_seconds The HTTP request latencies in seconds. # TYPE http_handler_duration_seconds histogram http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.005"} 0 http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.01"} 0 http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.025"} 0 http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.05"} 0 http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.1"} 1 http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.25"} 2 http_handler_duration_seconds_bucket{handler="publish_metrics",le="0.5"} 2 http_handler_duration_seconds_bucket{handler="publish_metrics",le="1"} 2 http_handler_duration_seconds_bucket{handler="publish_metrics",le="2.5"} 2 http_handler_duration_seconds_bucket{handler="publish_metrics",le="5"} 2 http_handler_duration_seconds_bucket{handler="publish_metrics",le="10"} 2 http_handler_duration_seconds_bucket{handler="publish_metrics",le="+Inf"} 2 http_handler_duration_seconds_sum{handler="publish_metrics"} 0.174797041 http_handler_duration_seconds_count{handler="publish_metrics"} 2 # HELP http_handler_hits Number of HTTP requests made. # TYPE http_handler_hits counter http_handler_hits{handler="publish_metrics"} 2 # HELP json_rpc_duration_seconds The json-rpc latencies in seconds. # TYPE json_rpc_duration_seconds histogram json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.005"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.01"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.025"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.05"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.1"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.25"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="0.5"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="1"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="2.5"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="5"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="10"} 1 json_rpc_duration_seconds_bucket{rpc_method="suix_getLatestSuiSystemState",le="+Inf"} 1 json_rpc_duration_seconds_sum{rpc_method="suix_getLatestSuiSystemState"} 0 json_rpc_duration_seconds_count{rpc_method="suix_getLatestSuiSystemState"} 1 # HELP json_rpc_state Number of successful/failed requests made. # TYPE json_rpc_state counter json_rpc_state{rpc_method="suix_getLatestSuiSystemState",status="success"} 1 json_rpc_state{rpc_method="update_peer_count",status="success"} 4 # HELP protobuf_compression_seconds The time it takes to compress a remote_write payload in seconds. # TYPE protobuf_compression_seconds histogram protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000001"} 0 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000002"} 0 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000004"} 0 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000008"} 2 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000016"} 2 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000032"} 6 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000064"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000128"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000256"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00000512"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00001024"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00002048"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00004096"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="0.00008192"} 8 protobuf_compression_seconds_bucket{operation="encode_compress",le="+Inf"} 8 protobuf_compression_seconds_sum{operation="encode_compress"} 0.0000018309999999999997 protobuf_compression_seconds_count{operation="encode_compress"} 8 # HELP protobuf_decode_duration_seconds The time it takes to perform various consumer operations in seconds. # TYPE protobuf_decode_duration_seconds histogram protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0008"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0016"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0032"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0064"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0128"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0256"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.0512"} 0 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.1024"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.2048"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.4096"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="0.8192"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="1"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="1.25"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="1.5"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="1.75"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="2"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="4"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="8"} 2 protobuf_decode_duration_seconds_bucket{operation="convert_to_remote_write",le="+Inf"} 2 protobuf_decode_duration_seconds_sum{operation="convert_to_remote_write"} 0.166288916 protobuf_decode_duration_seconds_count{operation="convert_to_remote_write"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0008"} 0 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0016"} 0 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0032"} 0 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0064"} 0 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0128"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0256"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.0512"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.1024"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.2048"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.4096"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="0.8192"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="1"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="1.25"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="1.5"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="1.75"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="2"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="4"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="8"} 2 protobuf_decode_duration_seconds_bucket{operation="decode_len_delim_protobuf",le="+Inf"} 2 protobuf_decode_duration_seconds_sum{operation="decode_len_delim_protobuf"} 0.020646582 protobuf_decode_duration_seconds_count{operation="decode_len_delim_protobuf"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0008"} 0 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0016"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0032"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0064"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0128"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0256"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.0512"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.1024"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.2048"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.4096"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="0.8192"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="1"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="1.25"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="1.5"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="1.75"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="2"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="4"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="8"} 2 protobuf_decode_duration_seconds_bucket{operation="populate_labels",le="+Inf"} 2 protobuf_decode_duration_seconds_sum{operation="populate_labels"} 0.002759708 protobuf_decode_duration_seconds_count{operation="populate_labels"} 2 ``` --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
- Loading branch information