Documentation ¶
Index ¶
Constants ¶
const ExePathEnvVar = "OTEL_GO_AUTO_TARGET_EXE"
ExePathEnvVar is the environment variable key whose value points to the instrumented executable.
Variables ¶
var ( // ErrInterrupted is returned when a process was interrupted but didn't // fail in any other way. ErrInterrupted = errors.New("interrupted") // ErrProcessNotFound is returned when a requested process is not currently // running. ErrProcessNotFound = errors.New("process not found") )
Functions ¶
This section is empty.
Types ¶
type AllocationDetails ¶
AllocationDetails are the details about allocated memory.
type Analyzer ¶
Analyzer is used to find actively running processes.
func NewAnalyzer ¶
NewAnalyzer returns a new [ProcessAnalyzer].
func (*Analyzer) Analyze ¶
func (a *Analyzer) Analyze(pid int, relevantFuncs map[string]interface{}) (*TargetDetails, error)
Analyze returns the target details for an actively running process.
func (*Analyzer) DiscoverProcessID ¶
DiscoverProcessID searches for the target as an actively running process, returning its PID if found.
func (*Analyzer) SetBuildInfo ¶
type TargetArgs ¶
TargetArgs are the binary target information.
func (*TargetArgs) Validate ¶
func (t *TargetArgs) Validate() error
Validate validates t and returns an error if not valid.
type TargetDetails ¶
type TargetDetails struct { PID int Functions []*binary.Func GoVersion *version.Version Libraries map[string]*version.Version AllocationDetails *AllocationDetails }
TargetDetails are the details about a target function.
func (*TargetDetails) GetFunctionOffset ¶
func (t *TargetDetails) GetFunctionOffset(name string) (uint64, error)
GetFunctionOffset returns the offset for of the function with name.
func (*TargetDetails) GetFunctionReturns ¶
func (t *TargetDetails) GetFunctionReturns(name string) ([]uint64, error)
GetFunctionReturns returns the return value of the call for the function with name.
func (*TargetDetails) IsRegistersABI ¶
func (t *TargetDetails) IsRegistersABI() bool
IsRegistersABI returns if t is supported.