autoprofile

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable

func Disable()

Disable disables the auto profiling (default)

func Enable

func Enable()

Enable enables the auto profiling (disabled by default)

func SetGetExternalPIDFunc deprecated

func SetGetExternalPIDFunc(fn func() string)

SetGetExternalPIDFunc configures the profiler to use provided function to retrieve the current PID

Deprecated: this is a noop function, the PID is populated by the agent before sending

func SetLogLevel deprecated

func SetLogLevel(level int)

SetLogLevel sets the min log level for autoprofiler

Deprecated: use autoprofile.SetLogger() to set the logger and configure the min log level directly

func SetLogger added in v1.8.0

func SetLogger(l logger.LeveledLogger)

SetLogger sets the leveled logger to use to output the diagnostic messages and errors

func SetOptions

func SetOptions(opts Options)

SetOptions configures the profiler with provided settings

func SetSendProfilesFunc

func SetSendProfilesFunc(fn SendProfilesFunc)

SetSendProfilesFunc configures the profiler to use provided function to write collected profiles

Types

type Options

type Options struct {
	IncludeProfilerFrames bool
	MaxBufferedProfiles   int
}

Options contains profiler configuration

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns profiler defaults

type Profile added in v1.13.2

type Profile internal.AgentProfile

Profile represents profiler data sent to the host agent

The type alias here is needed to expose the type defined inside the internal package. Ideally this type should've been defined in the same package with instana.agentS, however due to the way we activate profiling, this would introduce a circular dependency.

type SendProfilesFunc added in v1.13.2

type SendProfilesFunc func(profiles []Profile) error

SendProfilesFunc is a function that submits profiles to the host agent

Directories

Path Synopsis
pprof/profile
Package profile provides a representation of profile.proto and methods to encode/decode profiles in this format.
Package profile provides a representation of profile.proto and methods to encode/decode profiles in this format.

Jump to

Keyboard shortcuts

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