pyroscope

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// The application name reported to Pyroscope. The config value may be a [placeholder](https://caddyserver.com/docs/conventions#placeholders).
	ApplicationName string `json:"application_name,omitempty"`

	// The URL of the Pyroscope service. The config value may be a [placeholder](https://caddyserver.com/docs/conventions#placeholders).
	ServerAddress string `json:"server_address,omitempty"`

	// The token for Pyroscope Cloud. The config value may be a [placeholder](https://caddyserver.com/docs/conventions#placeholders).
	AuthToken string `json:"auth_token,omitempty"`

	// The Basic Auth username of the Phlare server
	BasicAuthUser string `json:"basic_auth_user,omitempty"`

	// The Basic Auth  of the Phlare server
	BasicAuthPassword string `json:"basic_auth_password,omitempty"`

	// The tenant ID to support the case of multi-tenant Phlare server
	TenantID string `json:"tenant_id,omitempty"`

	// Disable automatic runtime.GC runs between getting the heap profiles
	DisableGCRuns bool `json:"disable_gc_runs,omitempty"`

	// The frequency of upload to the Phlare server
	UploadRate caddy.Duration `json:"upload_rate,omitempty"`

	// The profiling parameters to be reported to Pyroscope.
	// The paramters cpu_profile_rate, block_profile_rate, and mutex_profile_fraction are inherited from the `profiling` app if `pyroscope`
	// is configured as a child module. The `profile_types` field is inherited if not configured explicitly.
	// If `pyroscope` is configured as an app, all the parameters are instated as-is.
	// Note: Pyroscope agent does not support `threadcreate` profile type, hence ignored.
	Parameters *caddy_profiling.Parameters `json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

The `pyroscope` app collects profiling data during the life-time of the process and uploads them to the Pyroscope server.

func (*App) CaddyModule

func (*App) CaddyModule() caddy.ModuleInfo

CaddyModule implements caddy.Module

func (*App) Provision

func (a *App) Provision(ctx caddy.Context) error

Provision sets the profiling paramters per the configuration

func (*App) SetProfilingParameter

func (a *App) SetProfilingParameter(parameters caddy_profiling.Parameters)

SetProfilingParameter sets the enabled Pyroscope profile types as configured by the `profiling` app. If the pyroscope app is configured with `profile_types`, then the ones specific to pyroscope take priority and the ones passed from the `profiling` app are ignored.

func (*App) Start

func (a *App) Start() (err error)

Starts the Pyroscope session and the upload background routine

func (*App) Stop

func (a *App) Stop() error

Stops the Pyroscope session

type ProfilingApp

type ProfilingApp struct {
	App
}

ProfilingApp is the container of the `pyroscope` profiler if configured as a guest module of the `profiling` app

func (*ProfilingApp) CaddyModule

func (*ProfilingApp) CaddyModule() caddy.ModuleInfo

Jump to

Keyboard shortcuts

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