agent

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelfProfile

func SelfProfile(sampleRate uint32, u upstream.Upstream, appName string, logger Logger, stopChan chan struct{}) error

Types

type Logger added in v0.0.26

type Logger interface {
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
}

Logger is an interface that library users can use It is based on logrus, but much smaller — That's because we don't want library users to have to implement all of the logrus's methods

type NoopLogger added in v0.0.33

type NoopLogger struct{}

func (*NoopLogger) Debugf added in v0.0.33

func (*NoopLogger) Debugf(format string, args ...interface{})

func (*NoopLogger) Errorf added in v0.0.33

func (*NoopLogger) Errorf(format string, args ...interface{})

func (*NoopLogger) Infof added in v0.0.33

func (*NoopLogger) Infof(format string, args ...interface{})

type ProfileSession

type ProfileSession struct {
	Logger Logger
	// contains filtered or unexported fields
}

func NewSession

func NewSession(c *SessionConfig, logger Logger) *ProfileSession

func (*ProfileSession) Start

func (ps *ProfileSession) Start() error

func (*ProfileSession) Stop

func (ps *ProfileSession) Stop()

type SessionConfig added in v0.0.30

type SessionConfig struct {
	Upstream         upstream.Upstream
	AppName          string
	ProfilingTypes   []spy.ProfileType
	DisableGCRuns    bool
	SpyName          string
	SampleRate       uint32
	UploadRate       time.Duration
	Pid              int
	WithSubprocesses bool
}

Directories

Path Synopsis
Package pprof writes runtime profiling data in the format expected by the pprof visualization tool.
Package pprof writes runtime profiling data in the format expected by the pprof visualization tool.
Package profiler is a public API golang apps should use to send data to pyroscope server.
Package profiler is a public API golang apps should use to send data to pyroscope server.
Package spy contains an interface (Spy) and functionality to register new spies
Package spy contains an interface (Spy) and functionality to register new spies

Jump to

Keyboard shortcuts

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