Skip to content
Snippets Groups Projects
Commit c8e57c8d authored by Fabian Seidl's avatar Fabian Seidl
Browse files

removed prometheus stuff

parent 49c0210c
No related branches found
No related tags found
3 merge requests!376Add additional example application hostname-checker,!343Add basic application framework and example application to show interaction between events an NBI,!342Resolve "Add an option to send gNMI Subscribe requests via SBI"
Pipeline #109051 passed
...@@ -655,30 +655,23 @@ func (p PndServer) DeleteOnd(ctx context.Context, request *ppb.DeleteOndRequest) ...@@ -655,30 +655,23 @@ func (p PndServer) DeleteOnd(ctx context.Context, request *ppb.DeleteOndRequest)
// SubscribePath subscribes to specifc paths of an ond // SubscribePath subscribes to specifc paths of an ond
func (p PndServer) SubscribePath(request *ppb.SubscribePathRequest, stream ppb.PndService_SubscribePathServer) error { func (p PndServer) SubscribePath(request *ppb.SubscribePathRequest, stream ppb.PndService_SubscribePathServer) error {
labels := prometheus.Labels{"service": "pnd", "rpc": "subscribe path"}
start := metrics.StartHook(labels, grpcRequestsTotal)
defer metrics.FinishHook(labels, start, grpcRequestDurationSecondsTotal, grpcRequestDurationSeconds)
pid, err := uuid.Parse(request.Pid) pid, err := uuid.Parse(request.Pid)
if err != nil { if err != nil {
return handleRPCError(labels, err) return err
} }
pnd, err := p.pndStore.Get(store.Query{ID: pid}) pnd, err := p.pndStore.Get(store.Query{ID: pid})
if err != nil { if err != nil {
log.Error(err) return err
return handleRPCError(labels, err)
} }
did, err := uuid.Parse(request.Did) did, err := uuid.Parse(request.Did)
if err != nil { if err != nil {
log.Error(err) return err
return handleRPCError(labels, err)
} }
if err := pnd.SubscribePath(did, request.Sublist); err != nil { if err := pnd.SubscribePath(did, request.Sublist); err != nil {
log.Error(err) return err
return handleRPCError(labels, err)
} }
return nil return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment