()
| 290 | } |
| 291 | |
| 292 | func (a *Agent) setupRuntimeService() (runtimecomp.Service, func()) { |
| 293 | if a == nil || !a.runModePolicy.EnableRuntimeCharts { |
| 294 | return nil, nil |
| 295 | } |
| 296 | |
| 297 | svc := runtimechartemit.New(a.Logger.With(slog.String("component", "runtime metrics service"))) |
| 298 | svc.Start(a.Name, a.Out) |
| 299 | return svc, svc.Stop |
| 300 | } |
| 301 | |
| 302 | func (a *Agent) signalAuditComplete() { |
| 303 | a.quitOnce.Do(func() { |