mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix(enterprise/coderd/proxyhealth): properly defer healthCheckDuration observe (#10848)
This commit is contained in:
@ -215,7 +215,7 @@ func (p *ProxyHealth) ProxyHosts() []string {
|
||||
// unreachable.
|
||||
func (p *ProxyHealth) runOnce(ctx context.Context, now time.Time) (map[uuid.UUID]ProxyStatus, error) {
|
||||
// Record from the given time.
|
||||
defer p.healthCheckDuration.Observe(time.Since(now).Seconds())
|
||||
defer func() { p.healthCheckDuration.Observe(time.Since(now).Seconds()) }()
|
||||
|
||||
//nolint:gocritic // Proxy health is a system service.
|
||||
proxies, err := p.db.GetWorkspaceProxies(dbauthz.AsSystemRestricted(ctx))
|
||||
|
Reference in New Issue
Block a user