Allow to export metrics list to a file #214

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:metrics-refactor into master 2023-07-26 21:07:57 +00:00
Owner

Close #164.

$ go run ./scripts/export-metrics/main.go -node node.out
$ jq '.[0]' node.out
{
  "name": "frostfs_node_object_get_req_count_success",
  "help": "The number of successful get requests processed",
  "type": "COUNTER"
}
Close #164. ``` $ go run ./scripts/export-metrics/main.go -node node.out $ jq '.[0]' node.out { "name": "frostfs_node_object_get_req_count_success", "help": "The number of successful get requests processed", "type": "COUNTER" } ```
fyrchik requested review from storage-core-developers 2023-04-05 10:49:45 +00:00
fyrchik requested review from storage-core-committers 2023-04-05 10:49:45 +00:00
fyrchik requested review from alexvanin 2023-04-05 10:49:55 +00:00
fyrchik requested review from dkirillov 2023-04-05 10:49:59 +00:00
fyrchik requested review from pogpp 2023-04-05 10:50:08 +00:00
fyrchik requested review from ironbee 2023-04-05 10:50:13 +00:00
fyrchik requested review from realloc 2023-04-05 10:52:22 +00:00
dstepanov-yadro reviewed 2023-04-05 12:57:15 +00:00
@ -0,0 +75,4 @@
for pd := range ch {
d, err := parseDesc(pd)
if err != nil {
return nil, err

Looks like memleak in case of error. goroutine knows nothing about return (no channel readers) and will try to call collectors[i].Describe(ch)

Looks like memleak in case of error. goroutine knows nothing about `return` (no channel readers) and will try to call `collectors[i].Describe(ch)`
Author
Owner

Fixed

Fixed
dstepanov-yadro marked this conversation as resolved
alexvanin reviewed 2023-04-06 14:01:54 +00:00
@ -0,0 +15,4 @@
ir = flag.String("ir", "", "File to export innerring node metrics to.")
)
func main() {
Owner

What you think about having a couple of unit tests in metrics package that print list of metrics for IR and Storage into stdout instead of having a separate application? These tests can be ignored with build tag.

What you think about having a couple of unit tests in metrics package that print list of metrics for IR and Storage into stdout instead of having a separate application? These tests can be ignored with build tag.
Author
Owner

I like the idea, but I've thought we need to integrate it into some pipeline.
Probably some go:generate is enough, though.

I like the idea, but I've thought we need to integrate it into some pipeline. Probably some `go:generate` is enough, though.
fyrchik marked this conversation as resolved
fyrchik force-pushed metrics-refactor from dbe9618987 to e58f2253fc 2023-04-07 05:00:00 +00:00 Compare
fyrchik force-pushed metrics-refactor from e58f2253fc to 9c53071e2f 2023-04-07 12:13:11 +00:00 Compare
fyrchik force-pushed metrics-refactor from 9c53071e2f to 63cd97c783 2023-04-19 11:48:13 +00:00 Compare
fyrchik force-pushed metrics-refactor from 63cd97c783 to a693a8db26 2023-04-20 08:16:02 +00:00 Compare
fyrchik changed title from WIP: Allow to export metrics list to a file to Allow to export metrics list to a file 2023-04-20 08:16:07 +00:00
dstepanov-yadro approved these changes 2023-04-20 15:10:21 +00:00
fyrchik force-pushed metrics-refactor from a693a8db26 to 3246500249 2023-04-21 09:45:19 +00:00 Compare
acid-ant approved these changes 2023-04-21 13:36:49 +00:00
fyrchik force-pushed metrics-refactor from 3246500249 to c70306b324 2023-04-24 09:01:19 +00:00 Compare
fyrchik merged commit c70306b324 into master 2023-04-24 09:42:17 +00:00
fyrchik deleted branch metrics-refactor 2023-04-24 09:42:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#214
No description provided.