chore: update collection metric

This commit is contained in:
Steven 2023-11-12 13:41:02 +08:00
parent 8d8b892d2a
commit f8d36ae1ef

View File

@ -10,6 +10,7 @@ import (
apiv2pb "github.com/boojack/slash/proto/gen/api/v2" apiv2pb "github.com/boojack/slash/proto/gen/api/v2"
storepb "github.com/boojack/slash/proto/gen/store" storepb "github.com/boojack/slash/proto/gen/store"
"github.com/boojack/slash/server/metric"
"github.com/boojack/slash/store" "github.com/boojack/slash/store"
) )
@ -78,6 +79,7 @@ func (s *APIV2Service) GetCollectionByName(ctx context.Context, request *apiv2pb
response := &apiv2pb.GetCollectionByNameResponse{ response := &apiv2pb.GetCollectionByNameResponse{
Collection: convertCollectionFromStore(collection), Collection: convertCollectionFromStore(collection),
} }
metric.Enqueue("collection view")
return response, nil return response, nil
} }
@ -99,6 +101,7 @@ func (s *APIV2Service) CreateCollection(ctx context.Context, request *apiv2pb.Cr
response := &apiv2pb.CreateCollectionResponse{ response := &apiv2pb.CreateCollectionResponse{
Collection: convertCollectionFromStore(collection), Collection: convertCollectionFromStore(collection),
} }
metric.Enqueue("collection create")
return response, nil return response, nil
} }