Documentation
¶
Index ¶
- Constants
- Variables
- func DisableSignalHandling(config *server.Config)
- func NewServerService(serv *server.Server, servicesToWaitFor func() []services.Service, ...) services.Service
- func RegisterHealthServer(mux *mux.Router, checks ...grpcutil.Check)
- type AdminServerConfig
- type AdminServerMode
- type Config
- type Pyroscope
- type SelfProfilingConfig
- type StorageConfig
- type StorageLayer
Constants ¶
const ( All string = "all" API string = "api" Version string = "version" Distributor string = "distributor" Server string = "server" IngesterRing string = "ring" Ingester string = "ingester" MemberlistKV string = "memberlist-kv" Querier string = "querier" StoreGateway string = "store-gateway" GRPCGateway string = "grpc-gateway" Storage string = "storage" UsageReport string = "usage-stats" QueryFrontend string = "query-frontend" QueryScheduler string = "query-scheduler" RuntimeConfig string = "runtime-config" Overrides string = "overrides" OverridesExporter string = "overrides-exporter" Compactor string = "compactor" Admin string = "admin" TenantSettings string = "tenant-settings" AdHocProfiles string = "ad-hoc-profiles" EmbeddedGrafana string = "embedded-grafana" FeatureFlags string = "feature-flags" Metastore string = "metastore" MetastoreClient string = "metastore-client" MetastoreAdmin string = "metastore-admin" SegmentWriter string = "segment-writer" SegmentWriterRing string = "segment-writer-ring" SegmentWriterClient string = "segment-writer-client" QueryBackend string = "query-backend" QueryBackendClient string = "query-backend-client" CompactionWorker string = "compaction-worker" PlacementAgent string = "placement-agent" PlacementManager string = "placement-manager" HealthServer string = "health-server" AdminServer string = "admin-server" RecordingRulesClient string = "recording-rules-client" Symbolizer string = "symbolizer" QueryDiagnosticsStore string = "query-diagnostics-store" QueryDiagnosticsAdmin string = "query-diagnostics-admin" AsyncQueryStore string = "async-query-store" )
The various modules that make up Pyroscope.
Variables ¶
var ErrInvalidStorageLayer = errors.New("invalid storage layer")
Functions ¶
func DisableSignalHandling ¶
DisableSignalHandling puts a dummy signal handler
func NewServerService ¶
func NewServerService(serv *server.Server, servicesToWaitFor func() []services.Service, log log.Logger) services.Service
NewServerService constructs service from Server component. servicesToWaitFor is called when server is stopping, and should return all services that need to terminate before server actually stops. N.B.: this function is NOT Cortex specific, please let's keep it that way. Passed server should not react on signals. Early return from Run function is considered to be an error.
Types ¶
type AdminServerConfig ¶ added in v2.2.0
type AdminServerConfig struct {
Mode AdminServerMode `yaml:"mode"`
HTTPAddress string `yaml:"http_listen_address"`
HTTPPort int `yaml:"http_listen_port"`
}
AdminServerConfig configures an optional secondary HTTP server that exposes metrics, pprof/debug and admin/ops endpoints on a separate port so they can be firewalled independently from the public-facing API port.
func (*AdminServerConfig) RegisterFlags ¶ added in v2.2.0
func (c *AdminServerConfig) RegisterFlags(f *flag.FlagSet)
type AdminServerMode ¶ added in v2.2.0
type AdminServerMode string
AdminServerMode controls how the optional admin HTTP server behaves.
const ( // AdminServerDisabled is the default: no secondary server, all routes on the main port. AdminServerDisabled AdminServerMode = "disabled" // AdminServerAdditional starts the admin server and registers operational // routes on both ports (main port keeps them too). AdminServerAdditional AdminServerMode = "additional" // AdminServerExclusive starts the admin server and moves operational routes // exclusively to it, removing them from the main port. AdminServerExclusive AdminServerMode = "exclusive" )
func (AdminServerMode) IsEnabled ¶ added in v2.2.0
func (m AdminServerMode) IsEnabled() bool
func (*AdminServerMode) Set ¶ added in v2.2.0
func (m *AdminServerMode) Set(v string) error
func (*AdminServerMode) String ¶ added in v2.2.0
func (m *AdminServerMode) String() string
type Config ¶
type Config struct {
Target flagext.StringSliceCSV `yaml:"target,omitempty"`
API api.Config `yaml:"api"`
Server server.Config `yaml:"server,omitempty"`
Metastore metastore.Config `yaml:"metastore"`
Distributor distributor.Config `yaml:"distributor,omitempty"`
Frontend frontend.Config `yaml:"frontend,omitempty"`
QueryBackend querybackend.Config `yaml:"query_backend"`
AdaptivePlacement placement.Config `yaml:"adaptive_placement"`
Symbolizer symbolizer.Config `yaml:"symbolizer"`
Worker worker.Config `yaml:"frontend_worker"`
LimitsConfig validation.Limits `yaml:"limits"`
SegmentWriter segmentwriter.Config `yaml:"segment_writer"`
MemberlistKV memberlist.KVConfig `yaml:"memberlist"`
PhlareDB phlaredb.Config `yaml:"pyroscopedb,omitempty"`
Tracing tracing.Config `yaml:"tracing"`
OverridesExporter exporter.Config `yaml:"overrides_exporter"`
RuntimeConfig runtimeconfig.Config `yaml:"runtime_config"`
CompactionWorker compactionworker.Config `yaml:"compaction_worker"`
TenantSettings settings.Config `yaml:"tenant_settings"`
Storage StorageConfig `yaml:"storage"`
SelfProfiling SelfProfilingConfig `yaml:"self_profiling,omitempty"`
MultitenancyEnabled bool `yaml:"multitenancy_enabled,omitempty"`
Analytics usagestats.Config `yaml:"analytics"`
ShowBanner bool `yaml:"show_banner,omitempty"`
ShutdownDelay time.Duration `yaml:"shutdown_delay,omitempty"`
ArchitectureStorage StorageLayer `yaml:"architecture_storage,omitempty"`
AdminServer AdminServerConfig `yaml:"admin_server,omitempty"`
EmbeddedGrafana grafana.Config `yaml:"embedded_grafana,omitempty"`
ConfigFile string `yaml:"-"`
ConfigExpandEnv bool `yaml:"-"`
DebugInfo debuginfo.Config `yaml:"-"`
SetFlags map[string]struct{} `yaml:"-"`
// Legacy v1
Querier querier.Config `yaml:"querier,omitempty"`
Ingester ingester.Config `yaml:"ingester,omitempty"`
Compactor compactor.Config `yaml:"compactor"`
StoreGateway storegateway.Config `yaml:"store_gateway,omitempty"`
QueryScheduler scheduler.Config `yaml:"query_scheduler"`
}
func (*Config) ApplyDynamicConfig ¶
func (*Config) Clone ¶
func (c *Config) Clone() flagext.Registerer
func (*Config) RecordSetFlag ¶ added in v2.2.0
func (*Config) RegisterFlags ¶
func (*Config) RegisterFlagsWithContext ¶
RegisterFlagsWithContext registers flag.
type Pyroscope ¶
type Pyroscope struct {
Cfg Config
ModuleManager *modules.Manager
API *api.API
Server *server.Server
SignalHandler *signals.Handler
MemberlistKV *memberlist.KVInitService
RuntimeConfig *runtimeconfig.Manager
Overrides *validation.Overrides
Compactor *compactor.MultitenantCompactor
TenantLimits validation.TenantLimits
// contains filtered or unexported fields
}
type SelfProfilingConfig ¶
type SelfProfilingConfig struct {
DisablePush bool `yaml:"disable_push,omitempty"`
MutexProfileFraction int `yaml:"mutex_profile_fraction,omitempty"`
BlockProfileRate int `yaml:"block_profile_rate,omitempty"`
UseK6Middleware bool `yaml:"use_k6_middleware,omitempty"`
TenantID string `yaml:"tenant_id,omitempty"`
}
func (*SelfProfilingConfig) RegisterFlags ¶
func (c *SelfProfilingConfig) RegisterFlags(f *flag.FlagSet)
type StorageConfig ¶
type StorageConfig struct {
Bucket objstoreclient.Config `yaml:",inline"`
}
func (*StorageConfig) RegisterFlags ¶
func (c *StorageConfig) RegisterFlags(f *flag.FlagSet)
type StorageLayer ¶
type StorageLayer string
const ( V1 StorageLayer = "v1" V1V2Dual StorageLayer = "v1-v2-dual" V2 StorageLayer = "v2" )
func (*StorageLayer) Set ¶
func (m *StorageLayer) Set(text string) error
func (*StorageLayer) String ¶
func (m *StorageLayer) String() string
func (*StorageLayer) UnmarshalText ¶
func (m *StorageLayer) UnmarshalText(text []byte) error