Documentation ¶
Overview ¶
Package tracehandler converts raw BPF traces into the enriched user-mode format and then forwards them to the reporter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(ctx context.Context, rep reporter.TraceReporter, traceProcessor TraceProcessor, traceInChan <-chan *host.Trace, intervals Times, cacheSize uint32, ) (workerExited <-chan libpf.Void, err error)
Start starts a goroutine that receives and processes trace updates over the given channel. Updates are sent periodically to the collection agent. The returned channel allows the caller to wait for the background worker to exit after a cancellation through the context.
Types ¶
type TraceProcessor ¶
type TraceProcessor interface { // MaybeNotifyAPMAgent notifies a potentially existing connected APM agent // that a stack trace was collected in their process. If an APM agent is // listening, the service name is returned. MaybeNotifyAPMAgent(rawTrace *host.Trace, umTraceHash libpf.TraceHash, count uint16) string // ConvertTrace converts a trace from eBPF into the form we want to send to // the collection agent. Depending on the frame type it will attempt to symbolize // the frame and send the associated metadata to the collection agent. ConvertTrace(trace *host.Trace) *libpf.Trace // SymbolizationComplete is called after a group of Trace has been symbolized. // It gets the timestamp of when the Traces (if any) were captured. The timestamp // is in essence an indicator that all Traces until that time have been now processed, // and any events up to this time can be processed. SymbolizationComplete(traceCaptureKTime times.KTime) }
TraceProcessor is an interface used by traceHandler to convert traces from a form received from eBPF to the form we wish to dispatch to the collection agent.
Click to show internal directories.
Click to hide internal directories.