Documentation ¶
Index ¶
- func BlockHints(p blockPlan, replica string) (*ingestv1.BlockHints, error)
- func GetShuffleShardingSubring(ring ring.ReadRing, userID string, limits StoreGatewayLimits) ring.ReadRing
- func NewGRPCHandler(svc QuerierSvc, useK6Middleware bool) connectgrpc.GRPCHandler
- func NewGRPCRoundTripper(transport connectgrpc.GRPCRoundTripper) querierv1connect.QuerierServiceHandler
- func NewMergeIterator[R any, Req Request, Res Response](ctx context.Context, r ResponseFromReplica[BidiClientMerge[Req, Res]]) *mergeIterator[R, Req, Res]
- type BidiClientMerge
- type ClientFactory
- type Closer
- type Config
- type IngesterQuerier
- type IngesterQueryClient
- type Limits
- type MergeIterator
- type MergeResult
- type NewQuerierParams
- type ProfileWithLabels
- type Querier
- func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querierv1.AnalyzeQueryRequest]) (*connect.Response[querierv1.AnalyzeQueryResponse], error)
- func (q *Querier) Diff(ctx context.Context, req *connect.Request[querierv1.DiffRequest]) (*connect.Response[querierv1.DiffResponse], error)
- func (q *Querier) GetProfileStats(ctx context.Context, req *connect.Request[typesv1.GetProfileStatsRequest]) (*connect.Response[typesv1.GetProfileStatsResponse], error)
- func (q *Querier) LabelNames(ctx context.Context, req *connect.Request[typesv1.LabelNamesRequest]) (*connect.Response[typesv1.LabelNamesResponse], error)
- func (q *Querier) LabelValues(ctx context.Context, req *connect.Request[typesv1.LabelValuesRequest]) (*connect.Response[typesv1.LabelValuesResponse], error)
- func (q *Querier) ProfileTypes(ctx context.Context, req *connect.Request[querierv1.ProfileTypesRequest]) (*connect.Response[querierv1.ProfileTypesResponse], error)
- func (q *Querier) SelectMergeProfile(ctx context.Context, req *connect.Request[querierv1.SelectMergeProfileRequest]) (*connect.Response[googlev1.Profile], error)
- func (q *Querier) SelectMergeSpanProfile(ctx context.Context, ...) (*connect.Response[querierv1.SelectMergeSpanProfileResponse], error)
- func (q *Querier) SelectMergeStacktraces(ctx context.Context, ...) (*connect.Response[querierv1.SelectMergeStacktracesResponse], error)
- func (q *Querier) SelectSeries(ctx context.Context, req *connect.Request[querierv1.SelectSeriesRequest]) (*connect.Response[querierv1.SelectSeriesResponse], error)
- func (q *Querier) Series(ctx context.Context, req *connect.Request[querierv1.SeriesRequest]) (*connect.Response[querierv1.SeriesResponse], error)
- type QuerierSvc
- type QueryHandlers
- type QueryReplicaFn
- type QueryReplicaWithHintsFn
- type Request
- type Response
- type ResponseFromReplica
- type StoreGatewayLimits
- type StoreGatewayQuerier
- type StoreGatewayQueryClient
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 NewGRPCRoundTripper ¶
func NewGRPCRoundTripper(transport connectgrpc.GRPCRoundTripper) querierv1connect.QuerierServiceHandler
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 ClientFactory ¶
type Config ¶
type Config struct { PoolConfig clientpool.PoolConfig `yaml:"pool_config,omitempty"` QueryStoreAfter time.Duration `yaml:"query_store_after" category:"advanced"` }
func (*Config) RegisterFlags ¶
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 IngesterQueryClient ¶
type IngesterQueryClient interface { LabelValues(context.Context, *connect.Request[typesv1.LabelValuesRequest]) (*connect.Response[typesv1.LabelValuesResponse], error) LabelNames(context.Context, *connect.Request[typesv1.LabelNamesRequest]) (*connect.Response[typesv1.LabelNamesResponse], error) ProfileTypes(context.Context, *connect.Request[ingestv1.ProfileTypesRequest]) (*connect.Response[ingestv1.ProfileTypesResponse], error) Series(ctx context.Context, req *connect.Request[ingestv1.SeriesRequest]) (*connect.Response[ingestv1.SeriesResponse], error) MergeProfilesStacktraces(context.Context) clientpool.BidiClientMergeProfilesStacktraces MergeProfilesLabels(ctx context.Context) clientpool.BidiClientMergeProfilesLabels MergeProfilesPprof(ctx context.Context) clientpool.BidiClientMergeProfilesPprof MergeSpanProfile(ctx context.Context) clientpool.BidiClientMergeSpanProfile BlockMetadata(ctx context.Context, req *connect.Request[ingestv1.BlockMetadataRequest]) (*connect.Response[ingestv1.BlockMetadataResponse], error) GetProfileStats(ctx context.Context, req *connect.Request[typesv1.GetProfileStatsRequest]) (*connect.Response[typesv1.GetProfileStatsResponse], error) GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) }
type MergeIterator ¶
type MergeIterator interface { iter.Iterator[*ProfileWithLabels] Keep() }
type MergeResult ¶
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 ¶
func (q *Querier) Diff(ctx context.Context, req *connect.Request[querierv1.DiffRequest]) (*connect.Response[querierv1.DiffResponse], error)
FIXME(kolesnikovae): The method is never used and should be removed.
func (*Querier) GetProfileStats ¶ added in v1.6.0
func (*Querier) LabelNames ¶
func (*Querier) LabelValues ¶
func (*Querier) ProfileTypes ¶
func (*Querier) SelectMergeProfile ¶
func (*Querier) SelectMergeSpanProfile ¶ added in v1.2.0
func (*Querier) SelectMergeStacktraces ¶
func (*Querier) SelectSeries ¶
type QuerierSvc ¶ added in v1.6.0
type QuerierSvc interface { querierv1connect.QuerierServiceHandler vcsv1connect.VCSServiceHandler }
type QueryHandlers ¶
type QueryHandlers struct {
// contains filtered or unexported fields
}
func NewHTTPHandlers ¶
func NewHTTPHandlers(client querierv1connect.QuerierServiceClient) *QueryHandlers
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 QueryReplicaWithHintsFn ¶ added in v1.2.0
type Request ¶
type Request interface { *ingestv1.MergeProfilesStacktracesRequest | *ingestv1.MergeProfilesLabelsRequest | *ingestv1.MergeProfilesPprofRequest | *ingestv1.MergeSpanProfileRequest }
type Response ¶
type Response interface { *ingestv1.MergeProfilesStacktracesResponse | *ingestv1.MergeProfilesLabelsResponse | *ingestv1.MergeProfilesPprofResponse | *ingestv1.MergeSpanProfileResponse }
type ResponseFromReplica ¶
type ResponseFromReplica[T any] struct { // contains filtered or unexported fields }
type StoreGatewayLimits ¶
type StoreGatewayQuerier ¶
type StoreGatewayQueryClient ¶
type StoreGatewayQueryClient interface { MergeProfilesStacktraces(context.Context) clientpool.BidiClientMergeProfilesStacktraces MergeProfilesLabels(ctx context.Context) clientpool.BidiClientMergeProfilesLabels MergeProfilesPprof(ctx context.Context) clientpool.BidiClientMergeProfilesPprof MergeSpanProfile(ctx context.Context) clientpool.BidiClientMergeSpanProfile ProfileTypes(context.Context, *connect.Request[ingestv1.ProfileTypesRequest]) (*connect.Response[ingestv1.ProfileTypesResponse], error) LabelValues(context.Context, *connect.Request[typesv1.LabelValuesRequest]) (*connect.Response[typesv1.LabelValuesResponse], error) LabelNames(context.Context, *connect.Request[typesv1.LabelNamesRequest]) (*connect.Response[typesv1.LabelNamesResponse], error) Series(context.Context, *connect.Request[ingestv1.SeriesRequest]) (*connect.Response[ingestv1.SeriesResponse], error) BlockMetadata(ctx context.Context, req *connect.Request[ingestv1.BlockMetadataRequest]) (*connect.Response[ingestv1.BlockMetadataResponse], error) GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) }