Skip to content

Commit

Permalink
perf: remove extra metrics (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianluong authored Sep 3, 2022
1 parent 8c4ace4 commit e8cb297
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var (
Name: "upstream_rpc_requests",
Help: "Count of total RPC requests forwarded to upstreams.",
},
[]string{"client", "endpoint_id", "url", "jsonrpc_method"},
[]string{"client", "upstream_id", "url", "jsonrpc_method"},
)

UpstreamRPCRequestErrorsTotal = promauto.NewCounterVec(
Expand All @@ -80,7 +80,7 @@ var (
Name: "upstream_rpc_request_errors",
Help: "Count of total errors when forwarding RPC requests to upstreams.",
},
[]string{"client", "endpoint_id", "url", "jsonrpc_method", "response_code", "jsonrpc_error_code"},
[]string{"client", "upstream_id", "url", "jsonrpc_method", "response_code", "jsonrpc_error_code"},
)

UpstreamRPCDuration = promauto.NewHistogramVec(
Expand All @@ -91,7 +91,7 @@ var (
Help: "Latency of RPC requests forwarded to upstreams.",
Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 40},
},
[]string{"client", "endpoint_id", "url", "jsonrpc_method", "response_code", "jsonrpc_error_code"},
[]string{"client", "upstream_id", "url", "jsonrpc_method", "response_code", "jsonrpc_error_code"},
)

// Health check metrics
Expand All @@ -103,7 +103,7 @@ var (
Name: "block_height",
Help: "Block height of upstream.",
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

BlockHeightCheckRequests = promauto.NewCounterVec(
Expand All @@ -113,7 +113,7 @@ var (
Name: "block_height_check",
Help: "Total block height requests made.",
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

BlockHeightCheckDuration = promauto.NewHistogramVec(
Expand All @@ -124,7 +124,7 @@ var (
Help: "Latency of block height requests.",
Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 40},
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

BlockHeightCheckErrors = promauto.NewCounterVec(
Expand All @@ -134,7 +134,7 @@ var (
Name: "block_height_check_errors",
Help: "Errors when retrieving block height of upstream.",
},
[]string{"endpoint_id", "url", "errorType"},
[]string{"upstream_id", "url", "errorType"},
)

PeerCount = promauto.NewGaugeVec(
Expand All @@ -144,7 +144,7 @@ var (
Name: "peer_count",
Help: "Block height of upstream.",
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

PeerCountCheckRequests = promauto.NewCounterVec(
Expand All @@ -154,7 +154,7 @@ var (
Name: "peer_count_check_requests",
Help: "Total peer count requests made.",
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

PeerCountCheckDuration = promauto.NewHistogramVec(
Expand All @@ -165,7 +165,7 @@ var (
Help: "Latency of peer count requests.",
Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 40},
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

PeerCountCheckErrors = promauto.NewCounterVec(
Expand All @@ -175,7 +175,7 @@ var (
Name: "peer_count_check_errors",
Help: "Errors when retrieving peer count of upstream.",
},
[]string{"endpoint_id", "url", "errorType"},
[]string{"upstream_id", "url", "errorType"},
)

// Use 0 or 1
Expand All @@ -186,7 +186,7 @@ var (
Name: "sync_status",
Help: "Sync Status of upstream.",
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

SyncStatusCheckRequests = promauto.NewCounterVec(
Expand All @@ -196,7 +196,7 @@ var (
Name: "sync_status_check_requests",
Help: "Total sync status requests made.",
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

SyncStatusCheckDuration = promauto.NewHistogramVec(
Expand All @@ -207,7 +207,7 @@ var (
Help: "Latency of sync status requests.",
Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 40},
},
[]string{"endpoint_id", "url"},
[]string{"upstream_id", "url"},
)

SyncStatusCheckErrors = promauto.NewCounterVec(
Expand All @@ -217,7 +217,7 @@ var (
Name: "sync_status_check_errors",
Help: "Errors when retrieving sync status of upstream.",
},
[]string{"endpoint_id", "url", "errorType"},
[]string{"upstream_id", "url", "errorType"},
)
)

Expand Down

0 comments on commit e8cb297

Please sign in to comment.