Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProfileTypes = []ProfileType{ ProfileCPU, ProfileAllocObjects, ProfileAllocSpace, ProfileInuseObjects, ProfileInuseSpace, }
View Source
var Labels = pprof.Labels //nolint:gochecknoglobals
View Source
var (
StandardLogger = &standardLoggerImpl{} //nolint:gochecknoglobals
)
Functions ¶
Types ¶
type Config ¶
type Config struct {
ApplicationName string // e.g backend.purchases
Tags map[string]string
ServerAddress string // e.g http://pyroscope.services.internal:4040
BasicAuthUser string // http basic auth user
BasicAuthPassword string // http basic auth password
TenantID string // specify TenantId when using phlare multi-tenancy
UploadRate time.Duration
Logger Logger
ProfileTypes []ProfileType
DisableGCRuns bool // this will disable automatic runtime.GC runs between getting the heap profiles
HTTPHeaders map[string]string
HTTPClient remote.HTTPClient
// Deprecated: the field will be removed in future releases.
// Use BasicAuthUser and BasicAuthPassword instead.
AuthToken string // specify this token when using pyroscope cloud
// Deprecated: the field will be removed in future releases.
// Use UploadRate instead.
DisableAutomaticResets bool
// Deprecated: the field will be removed in future releases.
// DisableCumulativeMerge is ignored.
DisableCumulativeMerge bool
// Deprecated: the field will be removed in future releases.
// SampleRate is set to 100 and is not configurable.
SampleRate uint32
}
type Logger ¶
type Logger interface {
Infof(_ string, _ ...interface{})
Debugf(_ string, _ ...interface{})
Errorf(_ string, _ ...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 ProfileType ¶
type ProfileType string
const ( ProfileCPU ProfileType = "cpu" ProfileInuseObjects ProfileType = "inuse_objects" ProfileAllocObjects ProfileType = "alloc_objects" ProfileInuseSpace ProfileType = "inuse_space" ProfileAllocSpace ProfileType = "alloc_space" ProfileGoroutines ProfileType = "goroutines" ProfileMutexCount ProfileType = "mutex_count" ProfileMutexDuration ProfileType = "mutex_duration" ProfileBlockCount ProfileType = "block_count" ProfileBlockDuration ProfileType = "block_duration" DefaultSampleRate = 100 )
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
type Session ¶
type Session struct {
// Deprecated: the field will be removed in future releases.
DisableAutomaticResets bool
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(c SessionConfig) (*Session, error)
type SessionConfig ¶
type SessionConfig struct {
Upstream upstream.Upstream
Logger Logger
AppName string
Tags map[string]string
ProfilingTypes []ProfileType
DisableGCRuns bool
UploadRate time.Duration
// Deprecated: the field will be removed in future releases.
// Use UploadRate instead.
DisableAutomaticResets bool
// Deprecated: the field will be removed in future releases.
// DisableCumulativeMerge is ignored.
DisableCumulativeMerge bool
// Deprecated: the field will be removed in future releases.
// SampleRate is set to 100 and is not configurable.
SampleRate uint32
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.