Skip to content

Commit

Permalink
Add goroutine annotation for stream internal loop (#5460)
Browse files Browse the repository at this point in the history
This will improve observability on the `mset.internalLoop()` in
profiles.

Signed-off-by: Neil Twigg <neil@nats.io>
  • Loading branch information
derekcollison authored May 21, 2024
2 parents 0b39e9e + e3093ff commit 6392242
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -5121,6 +5121,10 @@ func (mset *stream) name() string {

func (mset *stream) internalLoop() {
mset.mu.RLock()
setGoRoutineLabels(pprofLabels{
"account": mset.acc.Name,
"stream": mset.cfg.Name,
})
s := mset.srv
c := s.createInternalJetStreamClient()
c.registerWithAccount(mset.acc)
Expand Down

0 comments on commit 6392242

Please sign in to comment.