mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: rename service -> coder_service, remove agent_id label (#19241)
Pyroscope uses `service` tag for top level distinction. So move our `service` -> `coder_service`
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"runtime/pprof"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
@@ -348,16 +347,14 @@ func (m *agentConnectionMonitor) init() {
|
||||
func (m *agentConnectionMonitor) start(ctx context.Context) {
|
||||
ctx, m.cancel = context.WithCancel(ctx)
|
||||
m.wg.Add(2)
|
||||
go pprof.Do(ctx, pprof.Labels("agent", m.workspaceAgent.ID.String()),
|
||||
func(ctx context.Context) {
|
||||
defer m.wg.Done()
|
||||
m.sendPings(ctx)
|
||||
})
|
||||
go pprof.Do(ctx, pprof.Labels("agent", m.workspaceAgent.ID.String()),
|
||||
func(ctx context.Context) {
|
||||
defer m.wg.Done()
|
||||
m.monitor(ctx)
|
||||
})
|
||||
go func(ctx context.Context) {
|
||||
defer m.wg.Done()
|
||||
m.sendPings(ctx)
|
||||
}(ctx)
|
||||
go func(ctx context.Context) {
|
||||
defer m.wg.Done()
|
||||
m.monitor(ctx)
|
||||
}(ctx)
|
||||
}
|
||||
|
||||
func (m *agentConnectionMonitor) monitor(ctx context.Context) {
|
||||
|
||||
Reference in New Issue
Block a user