Documentation
¶
Index ¶
- func Init(config Config, additionalAttrs ...any) errordeprecated
- func InitWithConfig(cfg config.Config) error
- func IsRunning() bool
- func Start() error
- func Stop() error
- type Configdeprecated
- type ProfilingLogger
- func (p ProfilingLogger) DebugContext(ctx context.Context, msg string, args ...interface{})
- func (p ProfilingLogger) Debugf(msg string, params ...interface{})
- func (p ProfilingLogger) ErrorContext(ctx context.Context, msg string, args ...interface{})
- func (p ProfilingLogger) Errorf(msg string, params ...interface{})
- func (p ProfilingLogger) InfoContext(ctx context.Context, msg string, args ...interface{})
- func (p ProfilingLogger) Infof(msg string, params ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitWithConfig ¶ added in v1.1.0
InitWithConfig initializes profiling with the new configuration format
Types ¶
type Config
deprecated
added in
v1.0.6
type Config struct {
ApplicationName string `json:"application_name" validate:"required"` // ApplicationName specifies the name of the application.
ServerAddress string `json:"server_address"` // ServerAddress specifies the address of the profiling server.
Type string `json:"type" validate:"oneof=pyroscope pprof"` // Type specifies the type of profiler.
Tags map[string]string `json:"tags"` // Tags specifies the tags to be added to the profiler.
}
Deprecated: Use config.Config instead. This legacy configuration struct is maintained for backward compatibility but new code should use the more flexible config.Config struct with the new configuration format.
type ProfilingLogger ¶
type ProfilingLogger struct{}
ProfilingLogger implements the logging interface required by profiling libraries
func (ProfilingLogger) DebugContext ¶ added in v1.1.0
func (p ProfilingLogger) DebugContext(ctx context.Context, msg string, args ...interface{})
DebugContext logs debug using the slog package with context
func (ProfilingLogger) Debugf ¶
func (p ProfilingLogger) Debugf(msg string, params ...interface{})
func (ProfilingLogger) ErrorContext ¶ added in v1.1.0
func (p ProfilingLogger) ErrorContext(ctx context.Context, msg string, args ...interface{})
ErrorContext logs error using the slog package with context
func (ProfilingLogger) Errorf ¶
func (p ProfilingLogger) Errorf(msg string, params ...interface{})
func (ProfilingLogger) InfoContext ¶ added in v1.1.0
func (p ProfilingLogger) InfoContext(ctx context.Context, msg string, args ...interface{})
InfoContext logs info using the slog package with context
func (ProfilingLogger) Infof ¶
func (p ProfilingLogger) Infof(msg string, params ...interface{})
For backward compatibility with pyroscope library, implement the original methods using context functions
Click to show internal directories.
Click to hide internal directories.