Skip to content

Commit

Permalink
register the metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Littley <[email protected]>
  • Loading branch information
cody-littley committed Dec 9, 2024
1 parent 0bca390 commit 7eafa75
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions disperser/apiserver/metrics_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package apiserver
import (
grpcprom "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"google.golang.org/grpc"
"time"
)
Expand Down Expand Up @@ -33,7 +34,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {

objectives := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}

getBlobCommitmentLatency := prometheus.NewSummaryVec(
getBlobCommitmentLatency := promauto.With(registry).NewSummaryVec(
prometheus.SummaryOpts{
Namespace: namespace,
Name: "get_blob_commitment_latency_ms",
Expand All @@ -43,7 +44,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {
[]string{},
)

getPaymentStateLatency := prometheus.NewSummaryVec(
getPaymentStateLatency := promauto.With(registry).NewSummaryVec(
prometheus.SummaryOpts{
Namespace: namespace,
Name: "get_payment_state_latency_ms",
Expand All @@ -53,7 +54,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {
[]string{},
)

disperseBlobLatency := prometheus.NewSummaryVec(
disperseBlobLatency := promauto.With(registry).NewSummaryVec(
prometheus.SummaryOpts{
Namespace: namespace,
Name: "disperse_blob_latency_ms",
Expand All @@ -63,7 +64,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {
[]string{},
)

disperseBlobSize := prometheus.NewGaugeVec(
disperseBlobSize := promauto.With(registry).NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "disperse_blob_size_bytes",
Expand All @@ -72,7 +73,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {
[]string{},
)

validateDispersalRequestLatency := prometheus.NewSummaryVec(
validateDispersalRequestLatency := promauto.With(registry).NewSummaryVec(
prometheus.SummaryOpts{
Namespace: namespace,
Name: "validate_dispersal_request_latency_ms",
Expand All @@ -82,7 +83,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {
[]string{},
)

storeBlobLatency := prometheus.NewSummaryVec(
storeBlobLatency := promauto.With(registry).NewSummaryVec(
prometheus.SummaryOpts{
Namespace: namespace,
Name: "store_blob_latency_ms",
Expand All @@ -92,7 +93,7 @@ func newAPIServerV2Metrics(registry *prometheus.Registry) *metricsV2 {
[]string{},
)

getBlobStatusLatency := prometheus.NewSummaryVec(
getBlobStatusLatency := promauto.With(registry).NewSummaryVec(
prometheus.SummaryOpts{
Namespace: namespace,
Name: "get_blob_status_latency_ms",
Expand Down

0 comments on commit 7eafa75

Please sign in to comment.