querier

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockHints added in v1.6.0

func BlockHints(p blockPlan, replica string) (*ingestv1.BlockHints, error)

func GetShuffleShardingSubring

func GetShuffleShardingSubring(ring ring.ReadRing, userID string, limits StoreGatewayLimits) ring.ReadRing

GetShuffleShardingSubring returns the subring to be used for a given user. This function should be used both by store-gateway and querier in order to guarantee the same logic is used.

func NewGRPCHandler

func NewGRPCHandler(svc QuerierSvc, useK6Middleware bool) connectgrpc.GRPCHandler

func NewMergeIterator

func NewMergeIterator[
	R any,
	Req Request,
	Res Response,
](ctx context.Context, r ResponseFromReplica[BidiClientMerge[Req, Res]],
) *mergeIterator[R, Req, Res]

NewMergeIterator return a new iterator that stream profiles and allows to filter them using `Keep` to keep only a subset of the profiles for an aggregation result. Merging or querying profiles sample values is expensive, we only merge the sample of the profiles that are kept. On creating the iterator, we send a request to ingesters to fetch the first batch.

Types

type BidiClientMerge

type BidiClientMerge[Req any, Res any] interface {
	Send(Req) error
	Receive() (Res, error)
	CloseRequest() error
	CloseResponse() error
}

type ClientFactory

type ClientFactory[T any] func(addr string) (T, error)

type Closer

type Closer interface {
	CloseRequest() error
	CloseResponse() error
}

type Config

type Config struct {
	PoolConfig      clientpool.PoolConfig `yaml:"pool_config,omitempty"`
	QueryStoreAfter time.Duration         `yaml:"query_store_after" category:"advanced"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(fs *flag.FlagSet)

RegisterFlags registers distributor-related flags.

type IngesterQuerier

type IngesterQuerier struct {
	// contains filtered or unexported fields
}

IngesterQuerier helps with querying the ingesters.

func NewIngesterQuerier

func NewIngesterQuerier(pool *ring_client.Pool, ring ring.ReadRing) *IngesterQuerier

type Limits added in v1.6.0

type Limits interface {
	QueryAnalysisSeriesEnabled(string) bool
}

type MergeIterator

type MergeIterator interface {
	iter.Iterator[*ProfileWithLabels]
	Keep()
}

type MergeResult

type MergeResult[R any] interface {
	Result() (R, error)
}

type NewQuerierParams added in v1.6.0

type NewQuerierParams struct {
	Cfg             Config
	StoreGatewayCfg storegateway.Config
	Overrides       *validation.Overrides
	StorageBucket   phlareobj.Bucket
	CfgProvider     phlareobj.TenantConfigProvider
	IngestersRing   ring.ReadRing
	PoolFactory     ring_client.PoolFactory
	Reg             prometheus.Registerer
	Logger          log.Logger
	ClientOptions   []connect.ClientOption
}

type ProfileWithLabels

type ProfileWithLabels struct {
	Timestamp    int64
	Fingerprint  uint64
	IngesterAddr string
	phlaremodel.Labels
}

type Querier

type Querier struct {
	services.Service

	vcsv1connect.VCSServiceHandler
	// contains filtered or unexported fields
}

func New

func New(params *NewQuerierParams) (*Querier, error)

func (*Querier) AnalyzeQuery added in v1.6.0

func (*Querier) Diff

FIXME(kolesnikovae): The method is never used and should be removed.

func (*Querier) GetProfileStats added in v1.6.0

type QuerierSvc added in v1.6.0

type QueryHandlers

type QueryHandlers struct {
	// contains filtered or unexported fields
}

func (*QueryHandlers) LabelValues

func (q *QueryHandlers) LabelValues(w http.ResponseWriter, req *http.Request)

LabelValues only returns the label values for the given label name. This is mostly for fulfilling the pyroscope API and won't be used in the future. For example, /label-values?label=__name__ will return all the profile types.

func (*QueryHandlers) Render

func (q *QueryHandlers) Render(w http.ResponseWriter, req *http.Request)

func (*QueryHandlers) RenderDiff

func (q *QueryHandlers) RenderDiff(w http.ResponseWriter, req *http.Request)

type QueryReplicaFn

type QueryReplicaFn[T any, Querier any] func(ctx context.Context, q Querier) (T, error)

type QueryReplicaWithHintsFn added in v1.2.0

type QueryReplicaWithHintsFn[T any, Querier any] func(ctx context.Context, q Querier, hint *ingestv1.Hints) (T, error)

type ResponseFromReplica

type ResponseFromReplica[T any] struct {
	// contains filtered or unexported fields
}

type StoreGatewayLimits

type StoreGatewayLimits interface {
	StoreGatewayTenantShardSize(userID string) int
}

type StoreGatewayQuerier

type StoreGatewayQuerier struct {
	services.Service
	// contains filtered or unexported fields
}

Directories

Path Synopsis
vcs

Jump to

Keyboard shortcuts

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