From cb08bc85a9dd1e971493e7aec84fe294caec6293 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 31 Jan 2024 10:28:14 +0300 Subject: [PATCH 1/3] scripts: Allow to export metrics in markdorn Signed-off-by: Evgenii Stratonikov --- scripts/export-metrics/main.go | 40 ++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/scripts/export-metrics/main.go b/scripts/export-metrics/main.go index 63571e96d..61773eb0d 100644 --- a/scripts/export-metrics/main.go +++ b/scripts/export-metrics/main.go @@ -1,18 +1,22 @@ package main import ( + "bytes" "encoding/json" "flag" "fmt" "os" + "sort" + "strings" local_metrics "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/metrics" "git.frostfs.info/TrueCloudLab/frostfs-observability/metrics" ) var ( - node = flag.String("node", "", "File to export storage node metrics to.") - ir = flag.String("ir", "", "File to export innerring node metrics to.") + node = flag.String("node", "", "File to export storage node metrics to.") + ir = flag.String("ir", "", "File to export innerring node metrics to.") + format = flag.String("format", "json", "Format to export in. Supported formats: json (default), md.") ) func main() { @@ -37,12 +41,34 @@ func main() { os.Exit(1) } - ds := metrics.DescribeAll() + var data []byte + var err error - data, err := json.Marshal(ds) - if err != nil { - fmt.Fprintf(os.Stderr, "Could not parse marshal: %v\n", err) - os.Exit(1) + ds := metrics.DescribeAll() + switch *format { + case "md": + sort.Slice(ds, func(i, j int) bool { + return ds[i].Name < ds[j].Name + }) + b := bytes.NewBuffer(nil) + b.WriteString("# FrostFS Node prometheus metrics\n") + b.WriteString("Name | Description | Constant labels | Variable labels\n") + b.WriteString("-- | -- | -- | --\n") + for i := range ds { + constLabels := make([]string, 0, len(ds[i].ConstantLabels)) + for key, value := range ds[i].ConstantLabels { + constLabels = append(constLabels, fmt.Sprintf("%s=%s", key, value)) + } + varLabels := strings.Join(ds[i].VariableLabels, "; ") + fmt.Fprintf(b, "%s | %s | %s | %s\n", ds[i].Name, ds[i].Help, strings.Join(constLabels, "; "), varLabels) + } + data = b.Bytes() + default: + data, err = json.Marshal(ds) + if err != nil { + fmt.Fprintf(os.Stderr, "Could not parse marshal: %v\n", err) + os.Exit(1) + } } if err := os.WriteFile(filename, data, 0o644); err != nil { -- 2.45.2 From ee5feba0e1bf6d114ec528c551bc88873e940bc7 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 31 Jan 2024 10:29:42 +0300 Subject: [PATCH 2/3] Makefile: Add target to regenerate metrics description Signed-off-by: Evgenii Stratonikov --- Makefile | 6 ++++- docs/ir-metrics.md | 8 ++++++ docs/node-metrics.md | 59 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 docs/ir-metrics.md create mode 100644 docs/node-metrics.md diff --git a/Makefile b/Makefile index 84653a03a..9ee331238 100755 --- a/Makefile +++ b/Makefile @@ -94,6 +94,10 @@ export-metrics: dep CGO_ENABLED=0 \ go build -v -trimpath -o bin/export-metrics ./scripts/export-metrics +docs: export-metrics + @./bin/export-metrics -node ./docs/node-metrics.md -format md + @./bin/export-metrics -ir ./docs/ir-metrics.md -format md + # Regenerate proto files: protoc: @if [ ! -d "$(PROTOC_DIR)" ] || [ ! -d "$(PROTOC_GEN_GO_DIR)" ] || [ ! -d "$(PROTOGEN_FROSTFS_DIR)" ]; then \ @@ -259,4 +263,4 @@ env-down: docker volume rm -f frostfs-node_neo-go rm -f ./.cache/.frostfs-ir-state rm -f ./.cache/.frostfs-node-state - rm -rf ./.cache/storage \ No newline at end of file + rm -rf ./.cache/storage diff --git a/docs/ir-metrics.md b/docs/ir-metrics.md new file mode 100644 index 000000000..48947f488 --- /dev/null +++ b/docs/ir-metrics.md @@ -0,0 +1,8 @@ +# FrostFS Node prometheus metrics +Name | Description | Constant labels | Variable labels +-- | -- | -- | -- +frostfs_ir_ir_epoch | Current epoch as seen by inner-ring node. | | +frostfs_ir_ir_event_duration_seconds | Duration of processing of inner-ring events | | type; success +frostfs_ir_ir_health | Current inner-ring node state. | | +frostfs_ir_logger_entry_count | Total log entries emitted or dropped by severity level | | level; dropped +frostfs_ir_morphcache_request_duration_seconds | Morph cache request process duration | | success; method diff --git a/docs/node-metrics.md b/docs/node-metrics.md new file mode 100644 index 000000000..f4f2543aa --- /dev/null +++ b/docs/node-metrics.md @@ -0,0 +1,59 @@ +# FrostFS Node prometheus metrics +Name | Description | Constant labels | Variable labels +-- | -- | -- | -- +frostfs_node_blobovnicza_tree_get_bytes | Accumulated payload size read from Blobovnicza tree | | shard_id; path +frostfs_node_blobovnicza_tree_mode | Blobovnicza tree mode | | shard_id; path; mode +frostfs_node_blobovnicza_tree_object_move_duration_seconds | Accumulated Blobovnicza tree object move duration | | shard_id; path +frostfs_node_blobovnicza_tree_open_blobovnicza_count | Count of opened blobovniczas of Blobovnicza tree | | shard_id; path +frostfs_node_blobovnicza_tree_open_blobovnicza_items_total | Count of items in opened blobovniczas of Blobovnicza tree | | shard_id; path +frostfs_node_blobovnicza_tree_open_blobovnicza_size_bytes | Size of opened blobovniczas of Blobovnicza tree | | shard_id; path +frostfs_node_blobovnicza_tree_put_bytes | Accumulated payload size written to Blobovnicza tree | | shard_id; path +frostfs_node_blobovnicza_tree_rebuild_complete_percent | Percent of rebuild completeness | | shard_id; path +frostfs_node_blobovnicza_tree_rebuild_status | Blobovnicza tree rebuild status | | shard_id; path; mode +frostfs_node_blobovnicza_tree_request_duration_seconds | Accumulated Blobovnicza tree request process duration | | shard_id; path; success; method; with_storage_id +frostfs_node_blobstore_get_bytes | Accumulated payload size read from Blobstore | | shard_id +frostfs_node_blobstore_mode | Blobstore mode value | | shard_id; mode +frostfs_node_blobstore_put_bytes | Accumulated payload size written to Blobstore | | shard_id +frostfs_node_blobstore_request_duration_seconds | Accumulated Blobstore request process duration | | shard_id; success; method; with_storage_id +frostfs_node_engine_container_objects_total | Count of objects for each container | | shard_id; cid; type +frostfs_node_engine_container_size_bytes | Accumulated size of all objects in a container | | cid +frostfs_node_engine_errors_total | Shard's error counter | | shard_id +frostfs_node_engine_mode_info | Shard mode | | shard_id; mode +frostfs_node_engine_objects_total | Objects counters per shards. DEPRECATED: Will be deleted in next releasese, use frostfs_node_engine_container_objects_total metric. | | shard_id; type +frostfs_node_engine_payload_size_bytes | Accumulated size of all objects in a shard | | shard_id +frostfs_node_engine_request_duration_seconds | Duration of Engine requests | | method +frostfs_node_fstree_get_bytes | Accumulated payload size read from FSTree | | shard_id; path +frostfs_node_fstree_mode | FSTree mode value | | shard_id; path; mode +frostfs_node_fstree_put_bytes | Accumulated payload size written to FSTree | | shard_id; path +frostfs_node_fstree_request_duration_seconds | Accumulated FSTree request process duration | | shard_id; success; path; method +frostfs_node_garbage_collector_delete_duration_seconds | The total time of GC runs to delete objects from disk | | shard_id; success +frostfs_node_garbage_collector_deleted_objects_total | Total count of objects GC deleted or failed to delete from disk | | shard_id; status +frostfs_node_garbage_collector_marked_for_removal_objects_total | Total count of expired objects GC marked to remove | | shard_id; object_type +frostfs_node_garbage_collector_marking_duration_seconds | The total time of GC runs to mark expired objects as removed | | shard_id; success; object_type +frostfs_node_grpc_server_health | GRPC Server Endpoint health | | endpoint +frostfs_node_ir_epoch | Current epoch as seen by inner-ring node. | | +frostfs_node_logger_entry_count | Total log entries emitted or dropped by severity level | | level; dropped +frostfs_node_metabase_mode | Metabase mode | | shard_id; path; mode +frostfs_node_metabase_request_duration_seconds | Accumulated Metabase request process duration | | shard_id; success; path; method +frostfs_node_morph_invoke_duration_seconds | Cummulative duration of contract invocations | | invoke_type; contract; method; success +frostfs_node_morph_last_block | Index of the last received block | | +frostfs_node_morph_notifications_total | Number of notifications received by notification type | | notification_type +frostfs_node_morph_switches_total | Number of endpoint switches | | +frostfs_node_morphcache_request_duration_seconds | Morph cache request process duration | | success; method +frostfs_node_object_request_duration_seconds | Object Service request process duration | | method; success +frostfs_node_object_request_payload_bytes | Object Service request payload | | method +frostfs_node_pilorama_mode | Pilorama mode | | shard_id; mode +frostfs_node_pilorama_request_duration_seconds | Accumulated Pilorama request process duration | | shard_id; success; method +frostfs_node_policer_processed_objects_total | Total number of objects processed by policer | | +frostfs_node_replicator_in_flight_requests_total | Number of in-flight requests | | +frostfs_node_replicator_processed_objects_total | Number of objects processed since the node startup | | +frostfs_node_replicator_total_replicated_payload_size_bytes | Total size of payloads replicated | | +frostfs_node_state_health | Current Node state | | +frostfs_node_treeservice_replicate_task_duration_seconds | Duration of individual replication tasks executed as part of replication loops | | success +frostfs_node_treeservice_replicate_wait_duration_seconds | Duration of overall waiting time for replication loops | | success +frostfs_node_treeservice_sync_duration_seconds | Duration of synchronization operations | | success +frostfs_node_writecache_actual_objects_total | Actual objects count in writecache | | shard_id; storage +frostfs_node_writecache_estimated_size_bytes | Estimated writecache size | | shard_id; storage +frostfs_node_writecache_mode_info | Writecache mode value | | shard_id; mode +frostfs_node_writecache_operations_total | The number of writecache operations processed | | shard_id; storage; success; operation +frostfs_node_writecache_request_duration_seconds | Writecache request process duration | | shard_id; success; storage; method -- 2.45.2 From 92368d02213ae31feecd8e511cf9cddd5039415a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 31 Jan 2024 17:09:59 +0300 Subject: [PATCH 3/3] m Signed-off-by: Evgenii Stratonikov --- docs/ir-metrics.md | 10 +-- docs/node-metrics.md | 112 ++++++++++++++-------------- go.mod | 28 +++---- go.sum | Bin 39484 -> 39828 bytes scripts/changelog-updates/script.sh | 27 +++++++ scripts/export-metrics/main.go | 13 +++- 6 files changed, 113 insertions(+), 77 deletions(-) create mode 100755 scripts/changelog-updates/script.sh diff --git a/docs/ir-metrics.md b/docs/ir-metrics.md index 48947f488..be9b46080 100644 --- a/docs/ir-metrics.md +++ b/docs/ir-metrics.md @@ -1,8 +1,8 @@ # FrostFS Node prometheus metrics Name | Description | Constant labels | Variable labels -- | -- | -- | -- -frostfs_ir_ir_epoch | Current epoch as seen by inner-ring node. | | -frostfs_ir_ir_event_duration_seconds | Duration of processing of inner-ring events | | type; success -frostfs_ir_ir_health | Current inner-ring node state. | | -frostfs_ir_logger_entry_count | Total log entries emitted or dropped by severity level | | level; dropped -frostfs_ir_morphcache_request_duration_seconds | Morph cache request process duration | | success; method +`frostfs_ir_ir_epoch` | Current epoch as seen by inner-ring node. | | +`frostfs_ir_ir_event_duration_seconds` | Duration of processing of inner-ring events | | `type`
`success` +`frostfs_ir_ir_health` | Current inner-ring node state. | | +`frostfs_ir_logger_entry_count` | Total log entries emitted or dropped by severity level | | `level`
`dropped` +`frostfs_ir_morphcache_request_duration_seconds` | Morph cache request process duration | | `success`
`method` diff --git a/docs/node-metrics.md b/docs/node-metrics.md index f4f2543aa..af82c7fdf 100644 --- a/docs/node-metrics.md +++ b/docs/node-metrics.md @@ -1,59 +1,59 @@ # FrostFS Node prometheus metrics Name | Description | Constant labels | Variable labels -- | -- | -- | -- -frostfs_node_blobovnicza_tree_get_bytes | Accumulated payload size read from Blobovnicza tree | | shard_id; path -frostfs_node_blobovnicza_tree_mode | Blobovnicza tree mode | | shard_id; path; mode -frostfs_node_blobovnicza_tree_object_move_duration_seconds | Accumulated Blobovnicza tree object move duration | | shard_id; path -frostfs_node_blobovnicza_tree_open_blobovnicza_count | Count of opened blobovniczas of Blobovnicza tree | | shard_id; path -frostfs_node_blobovnicza_tree_open_blobovnicza_items_total | Count of items in opened blobovniczas of Blobovnicza tree | | shard_id; path -frostfs_node_blobovnicza_tree_open_blobovnicza_size_bytes | Size of opened blobovniczas of Blobovnicza tree | | shard_id; path -frostfs_node_blobovnicza_tree_put_bytes | Accumulated payload size written to Blobovnicza tree | | shard_id; path -frostfs_node_blobovnicza_tree_rebuild_complete_percent | Percent of rebuild completeness | | shard_id; path -frostfs_node_blobovnicza_tree_rebuild_status | Blobovnicza tree rebuild status | | shard_id; path; mode -frostfs_node_blobovnicza_tree_request_duration_seconds | Accumulated Blobovnicza tree request process duration | | shard_id; path; success; method; with_storage_id -frostfs_node_blobstore_get_bytes | Accumulated payload size read from Blobstore | | shard_id -frostfs_node_blobstore_mode | Blobstore mode value | | shard_id; mode -frostfs_node_blobstore_put_bytes | Accumulated payload size written to Blobstore | | shard_id -frostfs_node_blobstore_request_duration_seconds | Accumulated Blobstore request process duration | | shard_id; success; method; with_storage_id -frostfs_node_engine_container_objects_total | Count of objects for each container | | shard_id; cid; type -frostfs_node_engine_container_size_bytes | Accumulated size of all objects in a container | | cid -frostfs_node_engine_errors_total | Shard's error counter | | shard_id -frostfs_node_engine_mode_info | Shard mode | | shard_id; mode -frostfs_node_engine_objects_total | Objects counters per shards. DEPRECATED: Will be deleted in next releasese, use frostfs_node_engine_container_objects_total metric. | | shard_id; type -frostfs_node_engine_payload_size_bytes | Accumulated size of all objects in a shard | | shard_id -frostfs_node_engine_request_duration_seconds | Duration of Engine requests | | method -frostfs_node_fstree_get_bytes | Accumulated payload size read from FSTree | | shard_id; path -frostfs_node_fstree_mode | FSTree mode value | | shard_id; path; mode -frostfs_node_fstree_put_bytes | Accumulated payload size written to FSTree | | shard_id; path -frostfs_node_fstree_request_duration_seconds | Accumulated FSTree request process duration | | shard_id; success; path; method -frostfs_node_garbage_collector_delete_duration_seconds | The total time of GC runs to delete objects from disk | | shard_id; success -frostfs_node_garbage_collector_deleted_objects_total | Total count of objects GC deleted or failed to delete from disk | | shard_id; status -frostfs_node_garbage_collector_marked_for_removal_objects_total | Total count of expired objects GC marked to remove | | shard_id; object_type -frostfs_node_garbage_collector_marking_duration_seconds | The total time of GC runs to mark expired objects as removed | | shard_id; success; object_type -frostfs_node_grpc_server_health | GRPC Server Endpoint health | | endpoint -frostfs_node_ir_epoch | Current epoch as seen by inner-ring node. | | -frostfs_node_logger_entry_count | Total log entries emitted or dropped by severity level | | level; dropped -frostfs_node_metabase_mode | Metabase mode | | shard_id; path; mode -frostfs_node_metabase_request_duration_seconds | Accumulated Metabase request process duration | | shard_id; success; path; method -frostfs_node_morph_invoke_duration_seconds | Cummulative duration of contract invocations | | invoke_type; contract; method; success -frostfs_node_morph_last_block | Index of the last received block | | -frostfs_node_morph_notifications_total | Number of notifications received by notification type | | notification_type -frostfs_node_morph_switches_total | Number of endpoint switches | | -frostfs_node_morphcache_request_duration_seconds | Morph cache request process duration | | success; method -frostfs_node_object_request_duration_seconds | Object Service request process duration | | method; success -frostfs_node_object_request_payload_bytes | Object Service request payload | | method -frostfs_node_pilorama_mode | Pilorama mode | | shard_id; mode -frostfs_node_pilorama_request_duration_seconds | Accumulated Pilorama request process duration | | shard_id; success; method -frostfs_node_policer_processed_objects_total | Total number of objects processed by policer | | -frostfs_node_replicator_in_flight_requests_total | Number of in-flight requests | | -frostfs_node_replicator_processed_objects_total | Number of objects processed since the node startup | | -frostfs_node_replicator_total_replicated_payload_size_bytes | Total size of payloads replicated | | -frostfs_node_state_health | Current Node state | | -frostfs_node_treeservice_replicate_task_duration_seconds | Duration of individual replication tasks executed as part of replication loops | | success -frostfs_node_treeservice_replicate_wait_duration_seconds | Duration of overall waiting time for replication loops | | success -frostfs_node_treeservice_sync_duration_seconds | Duration of synchronization operations | | success -frostfs_node_writecache_actual_objects_total | Actual objects count in writecache | | shard_id; storage -frostfs_node_writecache_estimated_size_bytes | Estimated writecache size | | shard_id; storage -frostfs_node_writecache_mode_info | Writecache mode value | | shard_id; mode -frostfs_node_writecache_operations_total | The number of writecache operations processed | | shard_id; storage; success; operation -frostfs_node_writecache_request_duration_seconds | Writecache request process duration | | shard_id; success; storage; method +`frostfs_node_blobovnicza_tree_get_bytes` | Accumulated payload size read from Blobovnicza tree | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_mode` | Blobovnicza tree mode | | `shard_id`
`path`
`mode` +`frostfs_node_blobovnicza_tree_object_move_duration_seconds` | Accumulated Blobovnicza tree object move duration | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_open_blobovnicza_count` | Count of opened blobovniczas of Blobovnicza tree | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_open_blobovnicza_items_total` | Count of items in opened blobovniczas of Blobovnicza tree | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_open_blobovnicza_size_bytes` | Size of opened blobovniczas of Blobovnicza tree | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_put_bytes` | Accumulated payload size written to Blobovnicza tree | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_rebuild_complete_percent` | Percent of rebuild completeness | | `shard_id`
`path` +`frostfs_node_blobovnicza_tree_rebuild_status` | Blobovnicza tree rebuild status | | `shard_id`
`path`
`mode` +`frostfs_node_blobovnicza_tree_request_duration_seconds` | Accumulated Blobovnicza tree request process duration | | `shard_id`
`path`
`success`
`method`
`with_storage_id` +`frostfs_node_blobstore_get_bytes` | Accumulated payload size read from Blobstore | | `shard_id` +`frostfs_node_blobstore_mode` | Blobstore mode value | | `shard_id`
`mode` +`frostfs_node_blobstore_put_bytes` | Accumulated payload size written to Blobstore | | `shard_id` +`frostfs_node_blobstore_request_duration_seconds` | Accumulated Blobstore request process duration | | `shard_id`
`success`
`method`
`with_storage_id` +`frostfs_node_engine_container_objects_total` | Count of objects for each container | | `shard_id`
`cid`
`type` +`frostfs_node_engine_container_size_bytes` | Accumulated size of all objects in a container | | `cid` +`frostfs_node_engine_errors_total` | Shard's error counter | | `shard_id` +`frostfs_node_engine_mode_info` | Shard mode | | `shard_id`
`mode` +`frostfs_node_engine_objects_total` | Objects counters per shards. DEPRECATED: Will be deleted in next releasese, use frostfs_node_engine_container_objects_total metric. | | `shard_id`
`type` +`frostfs_node_engine_payload_size_bytes` | Accumulated size of all objects in a shard | | `shard_id` +`frostfs_node_engine_request_duration_seconds` | Duration of Engine requests | | `method` +`frostfs_node_fstree_get_bytes` | Accumulated payload size read from FSTree | | `shard_id`
`path` +`frostfs_node_fstree_mode` | FSTree mode value | | `shard_id`
`path`
`mode` +`frostfs_node_fstree_put_bytes` | Accumulated payload size written to FSTree | | `shard_id`
`path` +`frostfs_node_fstree_request_duration_seconds` | Accumulated FSTree request process duration | | `shard_id`
`success`
`path`
`method` +`frostfs_node_garbage_collector_delete_duration_seconds` | The total time of GC runs to delete objects from disk | | `shard_id`
`success` +`frostfs_node_garbage_collector_deleted_objects_total` | Total count of objects GC deleted or failed to delete from disk | | `shard_id`
`status` +`frostfs_node_garbage_collector_marked_for_removal_objects_total` | Total count of expired objects GC marked to remove | | `shard_id`
`object_type` +`frostfs_node_garbage_collector_marking_duration_seconds` | The total time of GC runs to mark expired objects as removed | | `shard_id`
`success`
`object_type` +`frostfs_node_grpc_server_health` | GRPC Server Endpoint health | | `endpoint` +`frostfs_node_ir_epoch` | Current epoch as seen by inner-ring node. | | +`frostfs_node_logger_entry_count` | Total log entries emitted or dropped by severity level | | `level`
`dropped` +`frostfs_node_metabase_mode` | Metabase mode | | `shard_id`
`path`
`mode` +`frostfs_node_metabase_request_duration_seconds` | Accumulated Metabase request process duration | | `shard_id`
`success`
`path`
`method` +`frostfs_node_morph_invoke_duration_seconds` | Cummulative duration of contract invocations | | `invoke_type`
`contract`
`method`
`success` +`frostfs_node_morph_last_block` | Index of the last received block | | +`frostfs_node_morph_notifications_total` | Number of notifications received by notification type | | `notification_type` +`frostfs_node_morph_switches_total` | Number of endpoint switches | | +`frostfs_node_morphcache_request_duration_seconds` | Morph cache request process duration | | `success`
`method` +`frostfs_node_object_request_duration_seconds` | Object Service request process duration | | `method`
`success` +`frostfs_node_object_request_payload_bytes` | Object Service request payload | | `method` +`frostfs_node_pilorama_mode` | Pilorama mode | | `shard_id`
`mode` +`frostfs_node_pilorama_request_duration_seconds` | Accumulated Pilorama request process duration | | `shard_id`
`success`
`method` +`frostfs_node_policer_processed_objects_total` | Total number of objects processed by policer | | +`frostfs_node_replicator_in_flight_requests_total` | Number of in-flight requests | | +`frostfs_node_replicator_processed_objects_total` | Number of objects processed since the node startup | | +`frostfs_node_replicator_total_replicated_payload_size_bytes` | Total size of payloads replicated | | +`frostfs_node_state_health` | Current Node state | | +`frostfs_node_treeservice_replicate_task_duration_seconds` | Duration of individual replication tasks executed as part of replication loops | | `success` +`frostfs_node_treeservice_replicate_wait_duration_seconds` | Duration of overall waiting time for replication loops | | `success` +`frostfs_node_treeservice_sync_duration_seconds` | Duration of synchronization operations | | `success` +`frostfs_node_writecache_actual_objects_total` | Actual objects count in writecache | | `shard_id`
`storage` +`frostfs_node_writecache_estimated_size_bytes` | Estimated writecache size | | `shard_id`
`storage` +`frostfs_node_writecache_mode_info` | Writecache mode value | | `shard_id`
`mode` +`frostfs_node_writecache_operations_total` | The number of writecache operations processed | | `shard_id`
`storage`
`success`
`operation` +`frostfs_node_writecache_request_duration_seconds` | Writecache request process duration | | `shard_id`
`success`
`storage`
`method` diff --git a/go.mod b/go.mod index 3b269db34..d01e41d07 100644 --- a/go.mod +++ b/go.mod @@ -3,27 +3,27 @@ module git.frostfs.info/TrueCloudLab/frostfs-node go 1.20 require ( - git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240112150928-72885aae835c - git.frostfs.info/TrueCloudLab/frostfs-contract v0.18.1-0.20240115082915-f2a82aa635aa + git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240126091953-d60ce83e4271 + git.frostfs.info/TrueCloudLab/frostfs-contract v0.18.1-0.20240130133737-6e72d0b3b405 git.frostfs.info/TrueCloudLab/frostfs-observability v0.0.0-20231101111734-b3ad3335ff65 - git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240117145620-110b7e41706e + git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240126141009-65b4525b3bf0 git.frostfs.info/TrueCloudLab/hrw v1.2.1 - git.frostfs.info/TrueCloudLab/policy-engine v0.0.0-20240122104724-06cbfe8691ad + git.frostfs.info/TrueCloudLab/policy-engine v0.0.0-20240129064140-8d21ab2d99d9 git.frostfs.info/TrueCloudLab/tzhash v1.8.0 github.com/cheggaaa/pb v1.0.29 github.com/chzyer/readline v1.5.1 github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 github.com/google/uuid v1.6.0 github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/klauspost/compress v1.17.4 + github.com/klauspost/compress v1.17.5 github.com/mitchellh/go-homedir v1.1.0 github.com/mr-tron/base58 v1.2.0 - github.com/multiformats/go-multiaddr v0.12.1 + github.com/multiformats/go-multiaddr v0.12.2 github.com/nats-io/nats.go v1.32.0 github.com/nspcc-dev/neo-go v0.105.1 github.com/olekukonko/tablewriter v0.0.5 github.com/panjf2000/ants/v2 v2.9.0 - github.com/paulmach/orb v0.11.0 + github.com/paulmach/orb v0.11.1 github.com/prometheus/client_golang v1.18.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 @@ -58,7 +58,7 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.2-0.20231222162921-eb75782795d2 // indirect + github.com/consensys/gnark-crypto v0.12.2-0.20240124182927-2e4aaaaefdbf // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect @@ -70,14 +70,16 @@ require ( github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -90,14 +92,14 @@ require ( github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/nspcc-dev/go-ordered-json v0.0.0-20240112074137-296698a162ae // indirect - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240122090917-ef99a7a9e33f // indirect + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240127082647-51ac153a7b00 // indirect github.com/nspcc-dev/rfc6979 v0.2.0 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/rivo/uniseg v0.4.4 // indirect + github.com/rivo/uniseg v0.4.6 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -116,8 +118,8 @@ require ( golang.org/x/net v0.20.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect gopkg.in/ini.v1 v1.67.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index ca28fdaec28c8cd516dc229d6324a82a56cfbfab..b9b13c90ec9e152644419ad0ace9450a5f228447 100644 GIT binary patch delta 1639 zcmZ{iyRX}17>AWZd$?7iMJ=tWwmJui78G*)`EDPn(A;dtNt}xvC(cmG_t^0zv12Fk z(w(+~%80o;EGS5T#Lz#1je)Te3y6WP3?%JxkkW5`rRRBn-~0RJhl8(wJoxHf4Iuyx z(>Pi(2%wu3YGMcpA5Gv>YT%(dV0_3GoxhaWOLU|+EF3~fi3%{;Nk0L66Ti* zA3yo-`jx$`C%-RiD1cFvM9C6il86B`RKozilQdd{SZqrDYD}h35Lc#w1M0qN^Onp` z{Gw7cJ7ccLBLdgnO3GLEf;N8@K=*5M>xmLr0W;u9CIEv_r(7lf`@O6A zrw@y6~%Wy0d4c7;n?e-nJQDk9m#uOKgA|2K7Rx9h+6z3~< z-?5#=B+*Xv(1%`wJiBQvG-VmYgnP`Zx>l__1neyh)`e8ri+X9sF^oZROB;fe&5I&l zcvWx%ODjf^ta58(FrP6Mdr)sqMPnf*wnZz9FHX~e(w!#_yq=Frw+r~@LFtP(9ynf< zK&Be6-8kIl11IDOxjW&2Rmy2|WukE*yItTi^t$&wlLBk;d` zzPgWiCf+KuA~W$&6z9vs`As|=XKTOH(W0r5;e%j+O<9ZQTM8|Bdj1UkU~>`v_bq_z zcA{B2mK11NRaCdB(%#w{cKzA7yfleWE)F#~)BUyxb1Z`8PftJ0@1MR)B4^ZWbFE5> zJMJ6$V6yI*i)bZH=?v(@qFaWPD40u~v}rpS*4{ily?9t90fi74S;ApehjCQhHtpr{ zR}HT{Mc0!GG95KE0UZm(5SC>YB3A<3Hz@)Yg2;AB#%|=les(qg^4{^~eXPyr<-<2$ zbsL?AvT3)g*a#Y$&Pd5jD%ina4YdB(&`OTj5rL*j(#0?pAOF;0R2WU<=bU z9fvj3GIuyI3r(wCQBp;VNgE$bU6J7QRi&#+{j#40o=LmGN(sx2{HKRE^JkB4UEYVv z|9Ld4?i=hJS}$15J(q=+a|aWoQGyg}JQ|SYu3j%w6w({Rd^+is=X99={P4zBav|?N Net)lM^Wt&i!hcQ=2nYZG delta 1334 zcmZ|P%WmUT7{GD0v<1XSsHkO7H8W~AGnL#l=Nw;-4OAj_;>6C)xnCAYPJB-sU*gnh zBwhe%21Z6=!=4QYAtSMYXJE;KgU~Ge%k%=lRQL_ z1{`8D7_ls^sya*3<5LTMsMS%o5_#=Ls8c<}+R$t*dazn&K_F_N5^xQQQ5IxCwsXnh z&iT{tPL8*>p8gT%*940=NM{VBvPe}KaxHC;#iGW6Ii_r_ZI$|V))BMPw5^G@TbJg9 z#CIqv)Y^sYQ1jME?s#h`{d=don}--uG=o3}LNLNQ1uMF9LVa@^#$nlZvLB*x4x&qeBY4Yd(J$YLzYkHTi_af=f8LwOi z?ow6cRhd*Zx6PAw?D75bq%><`az-ga82BaL+$7WI2hZLvk`N&T8N?x&(MOoZEW#YE zq0JeifkO{8i_YV|iJCByXI_zH29b(uU7i)d^^#;fB}ek3IJtfIZgO#W^18FSL z#{g`yy}%Gr%efTV zm=7g~pEQS+w#S%O92TOIIKj3v9j}xgWeln0hs?trD!sV;{Eg&S^nMznf8GLc6S;N? zK9}tcb8KUn_n|LBv1i$|&?Ze7jcmFoyMaGq;@NbP{C0Ie0ayFU;G=gid}R*oDifQp zx)oit{fL;=S^?*mh8ig7ZBh82XRI>I8MbXr<0_y zITT}omDwnkwN})u_nXt6wL;p^4a<|3TbC)%&d&ietCL(`O3sA4$zQp%qiwD9YyRNP zm-i$a-M-x6^%7?r<7_>&_yL$!Ak&z;is=ib>NIGz2G-cj<&w{&(;blBO60-IMYC;V z*HOB$v02#B;P)M z?`T^uk)Qalg>ue~QCbz0g6L;!{CV3 "$OLD_FILE" +while IFS= read -r line; do + x=( $line ) + old[${x[0]}]=${x[1]} +done < "$OLD_FILE" + +declare -A new +cat go.mod \ + | sed -n -e '6 { /require/ b x; :x { p; n; /)/ q; b x} }' > "$NEW_FILE" +while IFS= read -r line; do + x=( $line ) + new[${x[0]}]=${x[1]} +done < "$NEW_FILE" + +for index in ${!new[@]}; do + if [[ -n $old[$index] ]] && [[ ${old[$index]} != ${new[$index]} ]]; then + echo "- \`$index\` from ${old[$index]} to ${new[$index]}" + fi +done diff --git a/scripts/export-metrics/main.go b/scripts/export-metrics/main.go index 61773eb0d..ddc493d80 100644 --- a/scripts/export-metrics/main.go +++ b/scripts/export-metrics/main.go @@ -57,10 +57,17 @@ func main() { for i := range ds { constLabels := make([]string, 0, len(ds[i].ConstantLabels)) for key, value := range ds[i].ConstantLabels { - constLabels = append(constLabels, fmt.Sprintf("%s=%s", key, value)) + constLabels = append(constLabels, fmt.Sprintf("`%s=%s`", key, value)) } - varLabels := strings.Join(ds[i].VariableLabels, "; ") - fmt.Fprintf(b, "%s | %s | %s | %s\n", ds[i].Name, ds[i].Help, strings.Join(constLabels, "; "), varLabels) + + // FIXME omg do it better + ss := make([]string, len(ds[i].VariableLabels)) + copy(ss, ds[i].VariableLabels) + for i := range ss { + ss[i] = fmt.Sprintf("`%s`", ss[i]) + } + varLabels := strings.Join(ss, "
") + fmt.Fprintf(b, "`%s` | %s | %s | %s\n", ds[i].Name, ds[i].Help, strings.Join(constLabels, "
"), varLabels) } data = b.Bytes() default: -- 2.45.2