Documentation
¶
Index ¶
- type DiagnosticsService
- func (s *DiagnosticsService) Collect() (system.RuntimeInfo, system.MemoryInfo, system.GCInfo)
- func (s *DiagnosticsService) CollectActors(ctx context.Context) (system.ActorDiagnostics, error)
- func (s *DiagnosticsService) CollectAllActors(ctx context.Context) []system.ActorDiagnostics
- func (s *DiagnosticsService) Goroutines() (system.GoroutineProfile, error)
- func (s *DiagnosticsService) Profile(ctx context.Context, name string, seconds, debugLevel int) ([]byte, error)
- func (s *DiagnosticsService) ScanGoroutineLeaks() (system.GoroutineLeakReport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiagnosticsService ¶
type DiagnosticsService struct {
// contains filtered or unexported fields
}
DiagnosticsService gathers Go runtime, memory, and garbage-collector statistics for the diagnostics endpoints. It holds no external dependencies; WebSocket metrics and worker-goroutine counts are merged in at the handler layer to avoid an import cycle with the api/ws package.
func NewDiagnosticsService ¶
func NewDiagnosticsService(actors *francis.Runtime, coordinator *runs.Coordinator, environments *environment.EnvironmentService) *DiagnosticsService
func (*DiagnosticsService) Collect ¶
func (s *DiagnosticsService) Collect() (system.RuntimeInfo, system.MemoryInfo, system.GCInfo)
func (*DiagnosticsService) CollectActors ¶ added in v2.15.0
func (s *DiagnosticsService) CollectActors(ctx context.Context) (system.ActorDiagnostics, error)
CollectActors reports this process's Francis host, actor types, and run queue.
func (*DiagnosticsService) CollectAllActors ¶ added in v2.15.0
func (s *DiagnosticsService) CollectAllActors(ctx context.Context) []system.ActorDiagnostics
CollectAllActors gathers actor diagnostics from the local and every active remote environment.
func (*DiagnosticsService) Goroutines ¶ added in v2.16.0
func (s *DiagnosticsService) Goroutines() (system.GoroutineProfile, error)
Goroutines groups the live goroutines by identical stack, largest group first. Records that differ only by pprof labels share a stack and merge into one group.
func (*DiagnosticsService) Profile ¶ added in v2.15.0
func (s *DiagnosticsService) Profile(ctx context.Context, name string, seconds, debugLevel int) ([]byte, error)
Profile captures a pprof profile in the given debug format. The CPU profile and execution trace sample for seconds or until ctx ends.
func (*DiagnosticsService) ScanGoroutineLeaks ¶ added in v2.9.0
func (s *DiagnosticsService) ScanGoroutineLeaks() (system.GoroutineLeakReport, error)
ScanGoroutineLeaks runs a leak-detection GC and returns the leaked-goroutine pprof text (debug=1). debug=2 would dump every goroutine, not only leaks.