Documentation ¶
Index ¶
- type Adhoc
- type Admin
- type AdminAppDelete
- type AdminAppGet
- type AdminUser
- type AdminUserPasswordReset
- type Agent
- type Auth
- type CORSConfig
- type CombinedDbManager
- type Config
- type Connect
- type Convert
- type Database
- type DbManager
- type Exec
- type GithubOauth
- type GitlabOauth
- type GoogleOauth
- type IngestionAuth
- type InternalAuth
- type MetricsExportRule
- type MetricsExportRules
- type RetentionLevels
- type Server
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adhoc ¶ added in v0.3.0
type Adhoc struct { AnalyticsOptOut bool `def:"false" desc:"disables analytics" mapstructure:"analytics-opt-out"` LogLevel string `def:"info" desc:"log level: debug|info|warn|error" mapstructure:"log-level"` NoLogging bool `def:"false" desc:"disables logging from pyroscope" mapstructure:"no-logging"` MaxNodesSerialization int `def:"2048" desc:"max number of nodes used when saving profiles to disk" mapstructure:"max-nodes-serialization"` Duration time.Duration `` /* 137-byte string literal not displayed */ // Output configuration MaxNodesRender int `def:"8192" desc:"max number of nodes used to display data on the frontend" mapstructure:"max-nodes-render"` OutputFormat string `` /* 131-byte string literal not displayed */ NoJSONOutput bool `def:"false" desc:"disables generating native JSON file(s) in pyroscope data directory" mapstructure:"no-joson-output"` DataPath string `def:"<defaultAdhocDataPath>" desc:"directory where pyroscope stores adhoc profiles" mapstructure:"data-path"` // Spy configuration ApplicationName string `def:"" desc:"application name used when uploading profiling data" mapstructure:"application-name"` SampleRate uint `def:"100" desc:"sample rate for the profiler in Hz. 100 means reading 100 times per second" mapstructure:"sample-rate"` SpyName string `def:"auto" desc:"name of the profiler you want to use. Supported ones are: <supportedProfilers>" mapstructure:"spy-name"` DetectSubprocesses bool `` /* 127-byte string literal not displayed */ PyspyBlocking bool `def:"false" desc:"enables blocking mode for pyspy" mapstructure:"pyspy-blocking"` RbspyBlocking bool `def:"false" desc:"enables blocking mode for rbspy" mapstructure:"rbspy-blocking"` // Connect mode configuration Pid int `` /* 137-byte string literal not displayed */ // Push mode configuration Push bool `def:"false" desc:"Use push mode, exposing an ingestion endpoint for the profiled program to use" mapstructure:"push"` // Pull mode configuration URL string `def:"" desc:"URL to gather profiling data from" mapstructure:"url"` }
type Admin ¶ added in v0.3.0
type Admin struct { AdminAppDelete AdminAppDelete `skip:"true" mapstructure:",squash"` AdminAppGet AdminAppGet `skip:"true" mapstructure:",squash"` AdminUserPasswordReset AdminUserPasswordReset `skip:"true" mapstructure:",squash"` }
TODO how to abstract this better?
type AdminAppDelete ¶ added in v0.3.0
type AdminAppDelete struct { SocketPath string `def:"/tmp/pyroscope.sock" desc:"path where the admin server socket was created." mapstructure:"socket-path"` Force bool `def:"false" desc:"don't prompt for confirmation of dangerous actions" mapstructure:"force"` Timeout time.Duration `def:"30m" desc:"timeout for the server to respond" mapstructure:"timeout"` }
type AdminAppGet ¶ added in v0.3.0
type AdminUser ¶ added in v0.10.0
type AdminUser struct { Create bool `json:"-" deprecated:"true" def:"true" desc:"" mapstructure:"create"` Name string `json:"-" deprecated:"true" def:"admin" desc:"" mapstructure:"name"` Email string `json:"-" deprecated:"true" def:"admin@localhost.local" desc:"" mapstructure:"email"` Password string `json:"-" deprecated:"true" def:"admin" desc:"" mapstructure:"password"` }
type AdminUserPasswordReset ¶ added in v0.10.0
type AdminUserPasswordReset struct { SocketPath string `def:"/tmp/pyroscope.sock" desc:"path where the admin server socket was created." mapstructure:"socket-path"` Timeout time.Duration `def:"30m" desc:"timeout for the server to respond" mapstructure:"timeout"` Username string `desc:"user name (login)" mapstructure:"username"` Password string `desc:"new password" mapstructure:"password"` Enable bool `desc:"enable user" mapstructure:"enable"` }
type Agent ¶
type Agent struct { Config string `def:"<defaultAgentConfigPath>" desc:"location of config file" mapstructure:"config"` LogFilePath string `def:"<defaultAgentLogFilePath>" desc:"log file path" mapstructure:"log-file-path"` LogLevel string `def:"info" desc:"log level: debug|info|warn|error" mapstructure:"log-level"` NoLogging bool `def:"false" desc:"disables logging from pyroscope" mapstructure:"no-logging"` ServerAddress string `def:"http://localhost:4040" desc:"address of the pyroscope server" mapstructure:"server-address"` AuthToken string `def:"" desc:"authorization token used to upload profiling data" mapstructure:"auth-token"` UpstreamThreads int `def:"4" desc:"number of upload threads" mapstructure:"upstream-threads"` UpstreamRequestTimeout time.Duration `def:"10s" desc:"profile upload timeout" mapstructure:"upstream-request-timeout"` Targets []Target `yaml:"targets" desc:"list of targets to be profiled" mapstructure:"-"` // Note that in YAML the key is 'tags' but the flag is 'tag'. Tags map[string]string `yaml:"tags" name:"tag" def:"" desc:"tag key value pairs" mapstructure:"-"` }
type Auth ¶ added in v0.0.38
type Auth struct { SignupDefaultRole model.Role `` /* 202-byte string literal not displayed */ Internal InternalAuth `mapstructure:"internal"` Google GoogleOauth `mapstructure:"google"` Gitlab GitlabOauth `mapstructure:"gitlab"` Github GithubOauth `mapstructure:"github"` Ingestion IngestionAuth `mapstructure:"ingestion"` CookieSameSite http.SameSite `json:"-" deprecated:"true" def:"Lax" desc:"specifies SameSite attribute for JWT token cookie" mapstructure:"cookie-same-site"` CookieSecure bool `json:"-" deprecated:"true" def:"false" desc:"specifies Secure attribute for JWT token cookie" mapstructure:"cookie-secure"` JWTSecret string `json:"-" deprecated:"true" def:"" desc:"secret used to secure your JWT tokens" mapstructure:"jwt-secret"` LoginMaximumLifetimeDays int `` /* 158-byte string literal not displayed */ }
type CORSConfig ¶ added in v0.10.0
type CORSConfig struct { AllowedOrigins []string `json:"-" deprecated:"true" def:"" desc:"" mapstructure:"allowed-origins"` AllowedHeaders []string `json:"-" deprecated:"true" def:"" desc:"" mapstructure:"allowed-headers"` AllowedMethods []string `json:"-" deprecated:"true" def:"" desc:"" mapstructure:"allowed-methods"` AllowCredentials bool `json:"-" deprecated:"true" def:"" desc:"" mapstructure:"allow-credentials"` MaxAge int `json:"-" deprecated:"true" def:"" desc:"" mapstructure:"max-age"` }
type CombinedDbManager ¶ added in v0.0.38
type Config ¶
type Config struct { Version bool `mapstructure:"version"` Agent Agent `skip:"true" mapstructure:",squash"` Server Server `skip:"true" mapstructure:",squash"` Convert Convert `skip:"true" mapstructure:",squash"` Exec Exec `skip:"true" mapstructure:",squash"` Connect Connect `skip:"true" mapstructure:",squash"` DbManager DbManager `skip:"true" mapstructure:",squash"` Admin Admin `skip:"true" mapstructure:",squash"` Adhoc Adhoc `skip:"true" mapstructure:",squash"` }
type Connect ¶ added in v0.3.0
type Connect struct { LogLevel string `def:"info" desc:"log level: debug|info|warn|error" mapstructure:"log-level"` NoLogging bool `def:"false" desc:"disables logging from pyroscope" mapstructure:"no-logging"` // Spy configuration ApplicationName string `def:"" desc:"application name used when uploading profiling data" mapstructure:"application-name"` SampleRate uint `def:"100" desc:"sample rate for the profiler in Hz. 100 means reading 100 times per second" mapstructure:"sample-rate"` SpyName string `def:"" desc:"name of the profiler you want to use. Supported ones are: <supportedProfilers>" mapstructure:"spy-name"` DetectSubprocesses bool `` /* 127-byte string literal not displayed */ PyspyBlocking bool `def:"false" desc:"enables blocking mode for pyspy" mapstructure:"pyspy-blocking"` RbspyBlocking bool `def:"false" desc:"enables blocking mode for rbspy" mapstructure:"rbspy-blocking"` // Remote upstream configuration ServerAddress string `def:"http://localhost:4040" desc:"address of the pyroscope server" mapstructure:"server-address"` AuthToken string `def:"" desc:"authorization token used to upload profiling data" mapstructure:"auth-token"` UpstreamThreads int `def:"4" desc:"number of upload threads" mapstructure:"upstream-threads"` UpstreamRequestTimeout time.Duration `def:"10s" desc:"profile upload timeout" mapstructure:"upstream-request-timeout"` Tags map[string]string `name:"tag" def:"" desc:"tag in key=value form. The flag may be specified multiple times" mapstructure:"tags"` Pid int `` /* 137-byte string literal not displayed */ }
type DbManager ¶ added in v0.0.17
type DbManager struct { LogLevel string `def:"error" desc:"log level: debug|info|warn|error" mapstructure:"log-level"` StoragePath string `def:"<installPrefix>/var/lib/pyroscope" desc:"directory where pyroscope stores profiling data" mapstructure:"storage-path"` DstStartTime time.Time DstEndTime time.Time SrcStartTime time.Time ApplicationName string EnableProfiling bool `def:"false" desc:"enables profiling of dbmanager" mapstructure:"enable-profiling"` }
type Exec ¶
type Exec struct { LogLevel string `def:"info" desc:"log level: debug|info|warn|error" mapstructure:"log-level"` NoLogging bool `def:"false" desc:"disables logging from pyroscope" mapstructure:"no-logging"` // Spy configuration ApplicationName string `def:"" desc:"application name used when uploading profiling data" mapstructure:"application-name"` SampleRate uint `def:"100" desc:"sample rate for the profiler in Hz. 100 means reading 100 times per second" mapstructure:"sample-rate"` SpyName string `def:"auto" desc:"name of the profiler you want to use. Supported ones are: <supportedProfilers>" mapstructure:"spy-name"` DetectSubprocesses bool `` /* 127-byte string literal not displayed */ PyspyBlocking bool `def:"false" desc:"enables blocking mode for pyspy" mapstructure:"pyspy-blocking"` RbspyBlocking bool `def:"false" desc:"enables blocking mode for rbspy" mapstructure:"rbspy-blocking"` // Remote upstream configuration ServerAddress string `def:"http://localhost:4040" desc:"address of the pyroscope server" mapstructure:"server-address"` AuthToken string `def:"" desc:"authorization token used to upload profiling data" mapstructure:"auth-token"` UpstreamThreads int `def:"4" desc:"number of upload threads" mapstructure:"upstream-threads"` UpstreamRequestTimeout time.Duration `def:"10s" desc:"profile upload timeout" mapstructure:"upstream-request-timeout"` Tags map[string]string `name:"tag" def:"" desc:"tag in key=value form. The flag may be specified multiple times" mapstructure:"tags"` NoRootDrop bool `` /* 146-byte string literal not displayed */ UserName string `def:"" desc:"starts process under specified user name" mapstructure:"user-name"` GroupName string `def:"" desc:"starts process under specified group name" mapstructure:"group-name"` }
type GithubOauth ¶ added in v0.0.38
type GithubOauth struct { Enabled bool `json:"-" deprecated:"true" def:"false" desc:"enables Github Oauth" mapstructure:"enabled"` ClientID string `json:"-" deprecated:"true" def:"" desc:"client ID generated for Github API" mapstructure:"client-id"` ClientSecret string `json:"-" deprecated:"true" def:"" desc:"client secret generated for Github API" mapstructure:"client-secret"` RedirectURL string `` /* 182-byte string literal not displayed */ AuthURL string `` /* 128-byte string literal not displayed */ TokenURL string `` /* 133-byte string literal not displayed */ AllowedOrganizations []string `` /* 140-byte string literal not displayed */ }
type GitlabOauth ¶ added in v0.0.38
type GitlabOauth struct { Enabled bool `json:"-" deprecated:"true" def:"false" desc:"enables Gitlab Oauth" mapstructure:"enabled"` // TODO: I changed this to ClientID to fit others, but in Gitlab docs it's Application ID so it might get someone confused? ClientID string `json:"-" deprecated:"true" def:"" desc:"client ID generated for GitLab API" mapstructure:"client-id"` ClientSecret string `json:"-" deprecated:"true" def:"" desc:"client secret generated for GitLab API" mapstructure:"client-secret"` RedirectURL string `` /* 182-byte string literal not displayed */ AuthURL string `` /* 216-byte string literal not displayed */ TokenURL string `` /* 210-byte string literal not displayed */ APIURL string `` /* 196-byte string literal not displayed */ AllowedGroups []string `` /* 171-byte string literal not displayed */ }
type GoogleOauth ¶ added in v0.0.38
type GoogleOauth struct { // TODO: remove deprecated: true when we enable these back Enabled bool `json:"-" deprecated:"true" def:"false" desc:"enables Google Oauth" mapstructure:"enabled"` ClientID string `json:"-" deprecated:"true" def:"" desc:"client ID generated for Google API" mapstructure:"client-id"` ClientSecret string `json:"-" deprecated:"true" def:"" desc:"client secret generated for Google API" mapstructure:"client-secret"` RedirectURL string `` /* 182-byte string literal not displayed */ AuthURL string `` /* 172-byte string literal not displayed */ TokenURL string `` /* 175-byte string literal not displayed */ AllowedDomains []string `` /* 128-byte string literal not displayed */ }
TODO: Maybe merge Oauth structs into one (would have to move def and desc tags somewhere else in code)
type IngestionAuth ¶ added in v0.10.0
type IngestionAuth struct { Enabled bool `json:"-" deprecated:"true" def:"false" desc:"require authentication for ingestion endpoint" mapstructure:"enabled"` CacheTTL time.Duration `json:"-" deprecated:"true" def:"1s" mapstructure:"cache-ttl"` CacheSize int `json:"-" deprecated:"true" def:"1024" mapstructure:"cache-size"` }
type InternalAuth ¶ added in v0.10.0
type MetricsExportRule ¶ added in v0.2.1
type MetricsExportRule struct { Expr string `def:"" desc:"expression in FlameQL syntax to be evaluated against samples" mapstructure:"expr"` Node string `def:"total" desc:"tree node filter expression. Should be either 'total' or a valid regexp" mapstructure:"node"` GroupBy []string `def:"" desc:"list of tags to be used for aggregation. The tags are exported as prometheus labels" mapstructure:"group_by"` }
type MetricsExportRules ¶ added in v0.2.1
type MetricsExportRules map[string]MetricsExportRule
type RetentionLevels ¶ added in v0.2.5
type Server ¶
type Server struct { AnalyticsOptOut bool `def:"false" desc:"disables analytics" mapstructure:"analytics-opt-out"` Config string `def:"<installPrefix>/etc/pyroscope/server.yml" desc:"location of config file" mapstructure:"config"` LogLevel string `def:"info" desc:"log level: debug|info|warn|error" mapstructure:"log-level"` BadgerLogLevel string `def:"error" desc:"log level: debug|info|warn|error" mapstructure:"badger-log-level"` StoragePath string `def:"<installPrefix>/var/lib/pyroscope" desc:"directory where pyroscope stores profiling data" mapstructure:"storage-path"` APIBindAddr string `def:":4040" desc:"port for the HTTP(S) server used for data ingestion and web UI" mapstructure:"api-bind-addr"` BaseURL string `def:"" desc:"base URL for when the server is behind a reverse proxy with a different path" mapstructure:"base-url"` CacheEvictThreshold float64 `def:"0.25" desc:"percentage of memory at which cache evictions start" mapstructure:"cache-evict-threshold"` CacheEvictVolume float64 `def:"0.33" desc:"percentage of cache that is evicted per eviction run" mapstructure:"cache-evict-volume"` Database Database `mapstructure:"database"` // TODO: I don't think a lot of people will change these values. // I think these should just be constants. BadgerNoTruncate bool `` /* 137-byte string literal not displayed */ DisablePprofEndpoint bool `def:"false" desc:"disables /debug/pprof route" mapstructure:"disable-pprof-endpoint"` MaxNodesSerialization int `def:"2048" desc:"max number of nodes used when saving profiles to disk" mapstructure:"max-nodes-serialization"` MaxNodesRender int `def:"8192" desc:"max number of nodes used to display data on the frontend" mapstructure:"max-nodes-render"` // currently only used in our demo app HideApplications []string `def:"" desc:"please don't use, this will soon be deprecated" mapstructure:"hide-applications"` Retention time.Duration `` /* 163-byte string literal not displayed */ RetentionLevels RetentionLevels `` /* 133-byte string literal not displayed */ // Deprecated fields. They can be set (for backwards compatibility) but have no effect // TODO: we should print some warning messages when people try to use these SampleRate uint `deprecated:"true" mapstructure:"sample-rate"` OutOfSpaceThreshold bytesize.ByteSize `deprecated:"true" mapstructure:"out-of-space-threshold"` CacheDimensionSize int `deprecated:"true" mapstructure:"cache-dimensions-size"` CacheDictionarySize int `deprecated:"true" mapstructure:"cache-dictonary-size"` CacheSegmentSize int `deprecated:"true" mapstructure:"cache-segment-size"` CacheTreeSize int `deprecated:"true" mapstructure:"cache-tree-size"` CORS CORSConfig `mapstructure:"cors"` Auth Auth `mapstructure:"auth"` MetricsExportRules MetricsExportRules `yaml:"metrics-export-rules" def:"" desc:"metrics export rules" mapstructure:"metrics-export-rules"` TLSCertificateFile string `def:"" desc:"location of TLS Certificate file (.crt)" mapstructure:"tls-certificate-file"` TLSKeyFile string `def:"" desc:"location of TLS Private key file (.key)" mapstructure:"tls-key-file"` AdminSocketPath string `def:"/tmp/pyroscope.sock" desc:"path where the admin server socket will be created." mapstructure:"admin-socket-path"` EnableExperimentalAdmin bool `` /* 127-byte string literal not displayed */ NoAdhocUI bool `def:"false" desc:"disable the adhoc ui interface" mapstructure:"no-adhoc-ui"` AdhocDataPath string `def:"<defaultAdhocDataPath>" desc:"directory where pyroscope stores adhoc profiles" mapstructure:"adhoc-data-path"` ScrapeConfigs []*scrape.Config `yaml:"scrape-configs" mapstructure:"-"` NoSelfProfiling bool `def:"false" desc:"disable profiling of pyroscope itself" mapstructure:"no-self-profiling"` }
type Target ¶ added in v0.0.33
type Target struct { ServiceName string `yaml:"service-name" mapstructure:"service-name" desc:"name of the system service to be profiled"` SpyName string `` /* 132-byte string literal not displayed */ ApplicationName string `yaml:"application-name" mapstructure:"application-name" def:"" desc:"application name used when uploading profiling data"` SampleRate uint `` /* 137-byte string literal not displayed */ DetectSubprocesses bool `` /* 154-byte string literal not displayed */ // Spy-specific settings. PyspyBlocking bool `yaml:"pyspy-blocking" mapstructure:"pyspy-blocking" def:"false" desc:"enables blocking mode for pyspy"` RbspyBlocking bool `yaml:"rbspy-blocking" mapstructure:"rbspy-blocking" def:"false" desc:"enables blocking mode for rbspy"` // Tags are inherited from the agent level. At some point we may need // specifying tags at the target level (override). Tags map[string]string `yaml:"-"` }
Click to show internal directories.
Click to hide internal directories.