mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Annotate CPU and goroutine profiles with account/stream/consumer info
Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
@@ -2373,7 +2373,14 @@ func (mset *stream) setupMirrorConsumer() error {
|
||||
mirror.qch = make(chan struct{})
|
||||
mirror.wg.Add(1)
|
||||
ready.Add(1)
|
||||
if !mset.srv.startGoRoutine(func() { mset.processMirrorMsgs(mirror, &ready) }) {
|
||||
if !mset.srv.startGoRoutine(
|
||||
func() { mset.processMirrorMsgs(mirror, &ready) },
|
||||
pprofLabels{
|
||||
"type": "mirror",
|
||||
"account": mset.acc.Name,
|
||||
"stream": mset.cfg.Name,
|
||||
},
|
||||
) {
|
||||
ready.Done()
|
||||
}
|
||||
}
|
||||
@@ -2671,7 +2678,14 @@ func (mset *stream) setSourceConsumer(iname string, seq uint64, startTime time.T
|
||||
si.qch = make(chan struct{})
|
||||
si.wg.Add(1)
|
||||
ready.Add(1)
|
||||
if !mset.srv.startGoRoutine(func() { mset.processSourceMsgs(si, &ready) }) {
|
||||
if !mset.srv.startGoRoutine(
|
||||
func() { mset.processSourceMsgs(si, &ready) },
|
||||
pprofLabels{
|
||||
"type": "source",
|
||||
"account": mset.acc.Name,
|
||||
"stream": mset.cfg.Name,
|
||||
},
|
||||
) {
|
||||
ready.Done()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user