Documentation
¶
Index ¶
- Variables
- func ChannelClose(chID, goroutineID int)
- func ChannelRecv(chID, receiverID int, value interface{})
- func ChannelSend(chID, senderID int, value interface{})
- func FuncEntry(funcName string, file string, line int)
- func FuncExit(funcName string, file string, line int)
- func GoroutineCreate(gID int)
- func GoroutineSwitch(fromID, toID int)
- func InitInstrumentation(r recorder.Recorder)
- func InitRuntimeTracing(rec recorder.Recorder) error
- func MutexLock(mutexID, goroutineID int)
- func MutexUnlock(mutexID, goroutineID int)
- func RecordStatement(funcName string, file string, line int, description string)
- func SetInstrumentationOptions(options InstrumentationOptions)
- func ShouldInstrument(packagePath string) bool
- func StopRuntimeTracing()
- func TraceChannelOperation(ch interface{}, op string, value interface{})
- func TraceMutexOperation(mu interface{}, op string)
- type InstrumentationOptions
Constants ¶
This section is empty.
Variables ¶
var (
CurrentOptions = loadOptionsFromEnvironment()
)
Global instrumentation options
Functions ¶
func ChannelClose ¶
func ChannelClose(chID, goroutineID int)
ChannelClose records a channel close operation
func ChannelRecv ¶
func ChannelRecv(chID, receiverID int, value interface{})
ChannelRecv records a channel receive operation
func ChannelSend ¶
func ChannelSend(chID, senderID int, value interface{})
ChannelSend records a channel send operation
func GoroutineCreate ¶
func GoroutineCreate(gID int)
GoroutineCreate records a goroutine creation event
func GoroutineSwitch ¶
func GoroutineSwitch(fromID, toID int)
GoroutineSwitch records a scheduler switch between goroutines
func InitInstrumentation ¶
InitInstrumentation initializes the instrumentation with a recorder
func InitRuntimeTracing ¶
InitRuntimeTracing initializes runtime/trace integration
func MutexLock ¶
func MutexLock(mutexID, goroutineID int)
MutexLock records a mutex lock acquisition
func MutexUnlock ¶
func MutexUnlock(mutexID, goroutineID int)
MutexUnlock records a mutex unlock operation
func RecordStatement ¶
RecordStatement can be used to record execution of a specific statement
func SetInstrumentationOptions ¶
func SetInstrumentationOptions(options InstrumentationOptions)
SetInstrumentationOptions sets the current instrumentation options
func ShouldInstrument ¶
ShouldInstrument checks if a package should be instrumented
func StopRuntimeTracing ¶
func StopRuntimeTracing()
StopRuntimeTracing stops runtime trace integration
func TraceChannelOperation ¶
func TraceChannelOperation(ch interface{}, op string, value interface{})
TraceChannelOperation records a channel operation using our instrumentation and runtime trace
func TraceMutexOperation ¶
func TraceMutexOperation(mu interface{}, op string)
TraceMutexOperation records a mutex operation using our instrumentation and runtime trace
Types ¶
type InstrumentationOptions ¶
type InstrumentationOptions struct {
// Enabled indicates whether instrumentation is enabled
Enabled bool
// IncludePackages is a list of package paths to instrument
// Empty means all packages are instrumented
IncludePackages []string
// ExcludePackages is a list of package paths to exclude from instrumentation
// This takes precedence over IncludePackages
ExcludePackages []string
// InstrumentStdlib indicates whether to instrument standard library code
InstrumentStdlib bool
}
InstrumentationOptions stores configuration for selective instrumentation
func DefaultInstrumentationOptions ¶
func DefaultInstrumentationOptions() InstrumentationOptions
DefaultInstrumentationOptions returns the default instrumentation options