Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Constants ¶
func Constants(spec *ebpf.CollectionSpec, opts ...Option) error
Constants injects key-values defined by opts into spec as constant. The keys are used as volatile const names and the values are the const values.
If duplicate or colliding Options are passed, the last one passed is used.
func GetLatestOffset ¶
func GetLatestOffset(id structfield.ID) (structfield.OffsetKey, *version.Version)
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures key-values to be injected into an ebpf.CollectionSpec.
func WithAllocationDetails ¶
func WithAllocationDetails(details process.AllocationDetails) Option
WithAllocationDetails returns an option that will set "total_cpus", "start_addr", and "end_addr".
func WithKeyValue ¶
WithKeyValue returns an option that will set key to value.
func WithOffset ¶
func WithOffset(key string, id structfield.ID, ver *version.Version) Option
WithOffset returns an option that sets key to the offset value of the struct field defined by id at the specified version ver.
If the offset value is not known, an error is returned when the returned Option is used.
func WithRegistersABI ¶
WithRegistersABI returns an option that will set the "is_registers_abi" to value. This information can be determined from the IsRegistersABI method of the TargetDetails in "go.opentelemetry.io/auto/internal/pkg/process".
Commonly this is called like the following:
WithRegistersABI(target.IsRegistersABI())