tracehandler

package
v0.0.0-...-c8ed4f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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, times Times,
) error

Start starts a goroutine that receives and processes trace updates over the given channel. Updates are sent periodically to the collection agent.

Types

type Times

type Times interface {
	MonitorInterval() time.Duration
}

Times is a subset of config.IntervalsAndTimers.

type TraceProcessor

type TraceProcessor interface {
	// 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 libpf.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL