Documentation
¶
Index ¶
- Constants
- func Init(cfg *config.GoRoutineConfig) error
- func NewRunningGoDecl(goId int64) *ds.GoDecl
- type GoroutineCollector
- func (gc *GoroutineCollector) CollectorName() string
- func (gc *GoroutineCollector) Disable()
- func (gc *GoroutineCollector) DumpGoroutines()
- func (gc *GoroutineCollector) Enable()
- func (gc *GoroutineCollector) GetGoRoutineDecl(goId int64) *ds.GoDecl
- func (gc *GoroutineCollector) GetGoRoutineDeclCopy(goId int64) (ds.GoDecl, bool)
- func (gc *GoroutineCollector) GetGoRoutineName(goId int64) (string, bool)
- func (gc *GoroutineCollector) GetStatus() ds.CollectorStatus
- func (gc *GoroutineCollector) OnNewConnection()
- func (gc *GoroutineCollector) RecordGoRoutineEnd(decl *ds.GoDecl, panicVal any, flush bool)
- func (gc *GoroutineCollector) RecordGoRoutineStart(decl *ds.GoDecl, stack []byte)
- func (gc *GoroutineCollector) SetNextSendFull(full bool)
- func (gc *GoroutineCollector) UpdateGoRoutineGroup(decl *ds.GoDecl, newGroup string)
- func (gc *GoroutineCollector) UpdateGoRoutineName(decl *ds.GoDecl, newName string)
- func (gc *GoroutineCollector) UpdateGoRoutinePkg(decl *ds.GoDecl, newPkg string)
- func (gc *GoroutineCollector) UpdateGoRoutineTags(decl *ds.GoDecl, newTags []string)
Constants ¶
const ( GoState_Init = 0 GoState_Running = 1 GoState_Done = 2 )
const GoroutineGracePeriod = 2 * GoroutinePollInterval
GoroutineGracePeriod is how long to keep goroutine declarations before cleanup
const GoroutinePollInterval = 1 * time.Second
GoroutinePollInterval is how often we poll for goroutine stacks
const MinStackBufferSize = 1 << 20
MinStackBufferSize is the minimum buffer size for goroutine stack dumps (1MB)
const SingleStackBufferSize = 8 * 1024
Variables ¶
This section is empty.
Functions ¶
func Init ¶ added in v0.8.1
func Init(cfg *config.GoRoutineConfig) error
func NewRunningGoDecl ¶ added in v0.7.4
Types ¶
type GoroutineCollector ¶
type GoroutineCollector struct {
// contains filtered or unexported fields
}
GoroutineCollector implements the collector.Collector interface for goroutine collection
func GetInstance ¶
func GetInstance() *GoroutineCollector
GetInstance returns the singleton instance of GoroutineCollector
func (*GoroutineCollector) CollectorName ¶
func (gc *GoroutineCollector) CollectorName() string
CollectorName returns the unique name of the collector
func (*GoroutineCollector) Disable ¶
func (gc *GoroutineCollector) Disable()
func (*GoroutineCollector) DumpGoroutines ¶
func (gc *GoroutineCollector) DumpGoroutines()
DumpGoroutines dumps all goroutines and sends the information
func (*GoroutineCollector) Enable ¶
func (gc *GoroutineCollector) Enable()
Enable is called when the collector should start collecting data
func (*GoroutineCollector) GetGoRoutineDecl ¶ added in v0.5.2
func (gc *GoroutineCollector) GetGoRoutineDecl(goId int64) *ds.GoDecl
GetGoRoutineDecl gets the declaration for a goroutine by ID Returns nil if no declaration exists for the given ID
func (*GoroutineCollector) GetGoRoutineDeclCopy ¶ added in v0.9.0
func (gc *GoroutineCollector) GetGoRoutineDeclCopy(goId int64) (ds.GoDecl, bool)
GetGoRoutineDeclCopy gets a copy of the declaration for a goroutine by ID Returns a zero-value GoDecl and false if no declaration exists for the given ID
func (*GoroutineCollector) GetGoRoutineName ¶
func (gc *GoroutineCollector) GetGoRoutineName(goId int64) (string, bool)
GetGoRoutineName gets the name for a goroutine
func (*GoroutineCollector) GetStatus ¶ added in v0.5.16
func (gc *GoroutineCollector) GetStatus() ds.CollectorStatus
GetStatus returns the current status of the goroutine collector
func (*GoroutineCollector) OnNewConnection ¶ added in v0.8.1
func (gc *GoroutineCollector) OnNewConnection()
OnNewConnection is called when a new connection is established
func (*GoroutineCollector) RecordGoRoutineEnd ¶ added in v0.5.2
func (gc *GoroutineCollector) RecordGoRoutineEnd(decl *ds.GoDecl, panicVal any, flush bool)
func (*GoroutineCollector) RecordGoRoutineStart ¶ added in v0.5.2
func (gc *GoroutineCollector) RecordGoRoutineStart(decl *ds.GoDecl, stack []byte)
func (*GoroutineCollector) SetNextSendFull ¶ added in v0.5.0
func (gc *GoroutineCollector) SetNextSendFull(full bool)
SetNextSendFull sets the nextSendFull flag to force a full update on the next dump
func (*GoroutineCollector) UpdateGoRoutineGroup ¶ added in v0.9.0
func (gc *GoroutineCollector) UpdateGoRoutineGroup(decl *ds.GoDecl, newGroup string)
func (*GoroutineCollector) UpdateGoRoutineName ¶ added in v0.5.2
func (gc *GoroutineCollector) UpdateGoRoutineName(decl *ds.GoDecl, newName string)
func (*GoroutineCollector) UpdateGoRoutinePkg ¶ added in v0.7.4
func (gc *GoroutineCollector) UpdateGoRoutinePkg(decl *ds.GoDecl, newPkg string)
func (*GoroutineCollector) UpdateGoRoutineTags ¶ added in v0.5.2
func (gc *GoroutineCollector) UpdateGoRoutineTags(decl *ds.GoDecl, newTags []string)