Documentation
¶
Index ¶
- Constants
- Variables
- func Collect(bi *proc.BinaryInfo, ctxCh chan hookFunctionParameterListT)
- func CollectEnd(bi *proc.BinaryInfo, ctx hookFunctionParameterListT) (string, []*proc.Variable)
- func CollectEntry(bi *proc.BinaryInfo, ctx hookFunctionParameterListT) (string, []*proc.Variable)
- func GetFunctionByPrefix(bi *proc.BinaryInfo, prefix string) []*proc.Function
- func GetFunctionParameter(bi *proc.BinaryInfo, f *proc.Function, addr uint64, getRet bool) ([]proc.Parameter, error)
- func GetParametersFromCtx(ctx hookFunctionParameterListT) []proc.Parameter
- func GetRegisterFromCtx(ctx hookFunctionParameterListT) *op.DwarfRegisters
- func GetVariablesFromCtx(fn *proc.Function, ctx hookFunctionParameterListT, bi *proc.BinaryInfo, ...) ([]*proc.Variable, error)
- func InitializeTracer(serviceName string, collectorAddress string) error
- func PrintCtx(head string, ctx hookFunctionParameterListT)
- func PrintV(ident string, v proc.Variable)
- func ReadPerf(event *ebpf.Map, ctxCh chan hookFunctionParameterListT)
- func StartSpan(operationName string, goid int, parentid int, variables []*proc.Variable)
- func StopSpan(goid int, variables []*proc.Variable)
- func TraceDefer(ctx hookFunctionParameterListT, variables []*proc.Variable)
- func TraceEntry(functionName string, ctx hookFunctionParameterListT, ...)
- type GOID
- type Instrument
Constants ¶
View Source
const ( LOG_LEVEL = slog.LevelDebug LOG_ARG = true LOG_RETURN = true LOG_METRIC = true )
Variables ¶
View Source
var CTXSTK map[int][]context.Context
View Source
var CtxChan chan hookFunctionParameterListT = make(chan hookFunctionParameterListT, 100)
View Source
var GLOBALCTX = context.Background()
View Source
var LoadFullValue = proc.LoadConfig{true, 1, 64, 64, -1, 0}
TODO in the future we extend this part to be more flexiable to user
View Source
var SPANSTK map[int][]traceSpan.Span
View Source
var (
TRACE_FUNC = true
)
Functions ¶
func Collect ¶
func Collect(bi *proc.BinaryInfo, ctxCh chan hookFunctionParameterListT)
func CollectEnd ¶
func CollectEnd(bi *proc.BinaryInfo, ctx hookFunctionParameterListT) (string, []*proc.Variable)
func CollectEntry ¶
func CollectEntry(bi *proc.BinaryInfo, ctx hookFunctionParameterListT) (string, []*proc.Variable)
func GetFunctionByPrefix ¶
func GetFunctionByPrefix(bi *proc.BinaryInfo, prefix string) []*proc.Function
func GetFunctionParameter ¶
func GetFunctionParameter(bi *proc.BinaryInfo, f *proc.Function, addr uint64, getRet bool) ([]proc.Parameter, error)
getRet decide this function return parameter or return parameter
func GetParametersFromCtx ¶
func GetRegisterFromCtx ¶
func GetRegisterFromCtx(ctx hookFunctionParameterListT) *op.DwarfRegisters
func GetVariablesFromCtx ¶
func InitializeTracer ¶
func TraceDefer ¶
func TraceEntry ¶
func TraceDefer(ctx context.Context) { }
Types ¶
type Instrument ¶
type Instrument struct {
FunctionManager *internal.FunctionManager
// contains filtered or unexported fields
}
func GetInstrument ¶
func GetInstrument() *Instrument
func NewInstrument ¶
func NewInstrument(binaryPath string) *Instrument
func (*Instrument) ProbeFunctionWithPrefix ¶
func (i *Instrument) ProbeFunctionWithPrefix(prefix string) []string
func (Instrument) Start ¶
func (i Instrument) Start() error
func (Instrument) Stop ¶
func (i Instrument) Stop()
func (*Instrument) UnProbeFunctionWithPrefix ¶
func (i *Instrument) UnProbeFunctionWithPrefix(prefix string) []string
Click to show internal directories.
Click to hide internal directories.