spy

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package spy contains an interface (Spy) and functionality to register new spies

Index

Constants

View Source
const (
	ProfileCPU          ProfileType = "cpu"
	ProfileInuseObjects ProfileType = "inuse_objects"
	ProfileAllocObjects ProfileType = "alloc_objects"
	ProfileInuseSpace   ProfileType = "inuse_space"
	ProfileAllocSpace   ProfileType = "alloc_space"

	Go     = "gospy"
	EBPF   = "ebpfspy"
	Python = "pyspy"
	Ruby   = "rbspy"
)

Variables

View Source
var (
	SupportedSpies []string
)

Functions

func RegisterSpy

func RegisterSpy(name string, cb SpyIntitializer)

func ResolveAutoName

func ResolveAutoName(s string) string

func SupportedExecSpies added in v0.0.16

func SupportedExecSpies() []string

Types

type InitParams added in v0.27.0

type InitParams struct {
	Pid           int
	ProfileType   ProfileType
	SampleRate    uint32
	DisableGCRuns bool
	Logger        log.Logger
}

TODO: this interface is not the best as different spies have different arguments

type Labels added in v0.2.2

type Labels struct {
	// contains filtered or unexported fields
}

func NewLabels added in v0.2.2

func NewLabels() *Labels

func (*Labels) ID added in v0.2.2

func (l *Labels) ID() string

func (*Labels) Set added in v0.2.2

func (l *Labels) Set(key, val string)

func (*Labels) Tags added in v0.2.2

func (l *Labels) Tags() map[string]string

type ProfileType added in v0.0.30

type ProfileType string

func (ProfileType) AggregationType added in v0.0.30

func (t ProfileType) AggregationType() metadata.AggregationType

func (ProfileType) IsCumulative added in v0.0.30

func (t ProfileType) IsCumulative() bool

func (ProfileType) Units added in v0.0.30

func (t ProfileType) Units() metadata.Units

type Resettable added in v0.0.25

type Resettable interface {
	Reset()
}

type Spy

type Spy interface {
	Stop() error
	Snapshot(cb func(*Labels, []byte, uint64) error) error
}

type SpyIntitializer added in v0.2.0

type SpyIntitializer func(InitParams) (Spy, error)

func StartFunc added in v0.0.38

func StartFunc(name string) (SpyIntitializer, error)

Jump to

Keyboard shortcuts

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