Skip to content

Commit

Permalink
Emit subscribed topics metric for Subscribe2 too
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Normore committed Dec 29, 2023
1 parent a11a279 commit dc2259f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/api/message/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ func (s *Service) Subscribe2(stream proto.MessageApi_Subscribe2Server) error {
}
log.Info("updating subscription", zap.Int("num_content_topics", len(req.ContentTopics)))

metrics.EmitSubscribeTopicsLength(stream.Context(), log, len(req.ContentTopics))

topics := map[string]bool{}
for _, topic := range req.ContentTopics {
topics[topic] = true
Expand Down

0 comments on commit dc2259f

Please sign in to comment.