parca

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFormatLogfmt = "logfmt"
	LogFormatJSON   = "json"
)

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(logLevel, logFormat, debugName string) log.Logger

NewLogger returns a log.Logger that prints in the provided format at the provided level with a UTC timestamp and the caller of the log entry. If non empty, the debug name is also appended as a field to all log lines. Panics if the log level is not error, warn, info or debug. Log level is expected to be validated before passed to this function.

func Run

func Run(ctx context.Context, logger log.Logger, reg *prometheus.Registry, flags *Flags, version string) error

Run the parca server.

Types

type Flags

type Flags struct {
	ConfigPath         string   `default:"parca.yaml" help:"Path to config file."`
	Mode               string   `` /* 135-byte string literal not displayed */
	LogLevel           string   `default:"info" enum:"error,warn,info,debug" help:"log level."`
	Port               string   `default:":7070" help:"Port string for server"`
	CORSAllowedOrigins []string `help:"Allowed CORS origins."`
	OTLPAddress        string   `help:"OpenTelemetry collector address to send traces to."`
	Version            bool     `help:"Show application version."`
	PathPrefix         string   `default:"" help:"Path prefix for the UI"`

	MutexProfileFraction int `default:"0" help:"Fraction of mutex profile samples to collect."`
	BlockProfileRate     int `default:"0" help:"Sample rate for block profile."`

	StorageDebugValueLog bool  `` /* 167-byte string literal not displayed */
	StorageGranuleSize   int   `default:"8196" help:"Granule size for storage."`
	StorageActiveMemory  int64 `default:"536870912" help:"Amount of memory to use for active storage. Defaults to 512MB."`

	SymbolizerDemangleMode  string `` /* 159-byte string literal not displayed */
	SymbolizerNumberOfTries int    `default:"3" help:"Number of tries to attempt to symbolize an unsybolized location"`

	Metastore string `default:"badgerinmemory" help:"Which metastore implementation to use" enum:"badgerinmemory"`

	ProfileShareServer string `default:"api.pprof.me:443" help:"gRPC address to send share profile requests to."`

	DebugInfodUpstreamServers    []string      `` /* 225-byte string literal not displayed */
	DebugInfodHTTPRequestTimeout time.Duration `default:"5m" help:"Timeout duration for HTTP request to upstream debuginfod server. Defaults to 5m"`

	StoreAddress       string            `kong:"help='gRPC address to send profiles and symbols to.'"`
	BearerToken        string            `kong:"help='Bearer token to authenticate with store.'"`
	BearerTokenFile    string            `kong:"help='File to read bearer token from to authenticate with store.'"`
	Insecure           bool              `kong:"help='Send gRPC requests via plaintext instead of TLS.'"`
	InsecureSkipVerify bool              `kong:"help='Skip TLS certificate verification.'"`
	ExternalLabel      map[string]string `kong:"help='Label(s) to attach to all profiles in scraper-only mode.'"`
}

Jump to

Keyboard shortcuts

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