Documentation ¶
Index ¶
- type Config
- type Frontend
- func (f *Frontend) AnalyzeQuery(ctx context.Context, c *connect.Request[querierv1.AnalyzeQueryRequest]) (*connect.Response[querierv1.AnalyzeQueryResponse], error)
- func (f *Frontend) CheckReady(_ context.Context) error
- func (f *Frontend) Diff(ctx context.Context, c *connect.Request[querierv1.DiffRequest]) (*connect.Response[querierv1.DiffResponse], error)
- func (f *Frontend) GetProfileStats(ctx context.Context, c *connect.Request[typesv1.GetProfileStatsRequest]) (*connect.Response[typesv1.GetProfileStatsResponse], error)
- func (f *Frontend) LabelNames(ctx context.Context, c *connect.Request[typesv1.LabelNamesRequest]) (*connect.Response[typesv1.LabelNamesResponse], error)
- func (f *Frontend) LabelValues(ctx context.Context, c *connect.Request[typesv1.LabelValuesRequest]) (*connect.Response[typesv1.LabelValuesResponse], error)
- func (f *Frontend) ProfileTypes(ctx context.Context, c *connect.Request[querierv1.ProfileTypesRequest]) (*connect.Response[querierv1.ProfileTypesResponse], error)
- func (f *Frontend) QueryResult(ctx context.Context, r *connect.Request[frontendpb.QueryResultRequest]) (*connect.Response[frontendpb.QueryResultResponse], error)
- func (f *Frontend) SelectMergeProfile(ctx context.Context, c *connect.Request[querierv1.SelectMergeProfileRequest]) (*connect.Response[profilev1.Profile], error)
- func (f *Frontend) SelectMergeSpanProfile(ctx context.Context, ...) (*connect.Response[querierv1.SelectMergeSpanProfileResponse], error)
- func (f *Frontend) SelectMergeStacktraces(ctx context.Context, ...) (*connect.Response[querierv1.SelectMergeStacktracesResponse], error)
- func (f *Frontend) SelectSeries(ctx context.Context, c *connect.Request[querierv1.SelectSeriesRequest]) (*connect.Response[querierv1.SelectSeriesResponse], error)
- func (f *Frontend) Series(ctx context.Context, c *connect.Request[querierv1.SeriesRequest]) (*connect.Response[querierv1.SeriesResponse], error)
- type Limits
- type TimeInterval
- type TimeIntervalIterator
- type TimeIntervalIteratorOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SchedulerAddress string `yaml:"scheduler_address" doc:"hidden"` DNSLookupPeriod time.Duration `yaml:"scheduler_dns_lookup_period" category:"advanced" doc:"hidden"` WorkerConcurrency int `yaml:"scheduler_worker_concurrency" category:"advanced"` GRPCClientConfig grpcclient.Config `` /* 144-byte string literal not displayed */ // Used to find local IP address, that is sent to scheduler and querier-worker. InfNames []string `yaml:"instance_interface_names" category:"advanced" doc:"default=[<private network interfaces>]"` Addr string `yaml:"instance_addr" category:"advanced"` EnableIPv6 bool `yaml:"instance_enable_ipv6" category:"advanced"` Port int `yaml:"instance_port" category:"advanced"` // For backward compatibility only. The parameter has a name that is // inconsistent with the way address is specified in other places. // The parameter is replaced with `instance_addr`. AddrOld string `yaml:"address" category:"advanced" doc:"hidden"` // This configuration is injected internally. QuerySchedulerDiscovery schedulerdiscovery.Config `yaml:"-"` MaxLoopDuration time.Duration `yaml:"-"` }
Config for a Frontend.
type Frontend ¶
type Frontend struct { services.Service connectgrpc.GRPCRoundTripper vcsv1connect.VCSServiceHandler frontendpb.UnimplementedFrontendForQuerierServer // contains filtered or unexported fields }
Frontend implements GrpcRoundTripper. It queues HTTP requests, dispatches them to backends via gRPC, and handles retries for requests which failed.
func NewFrontend ¶
func NewFrontend(cfg Config, limits Limits, log log.Logger, reg prometheus.Registerer) (*Frontend, error)
NewFrontend creates a new frontend.
func (*Frontend) AnalyzeQuery ¶ added in v1.6.0
func (*Frontend) CheckReady ¶
CheckReady determines if the query frontend is ready. Function parameters/return chosen to match the same method in the ingester
func (*Frontend) GetProfileStats ¶ added in v1.6.0
func (*Frontend) LabelNames ¶
func (*Frontend) LabelValues ¶
func (*Frontend) ProfileTypes ¶
func (*Frontend) QueryResult ¶
func (f *Frontend) QueryResult(ctx context.Context, r *connect.Request[frontendpb.QueryResultRequest]) (*connect.Response[frontendpb.QueryResultResponse], error)
func (*Frontend) SelectMergeProfile ¶
func (*Frontend) SelectMergeSpanProfile ¶ added in v1.2.0
func (*Frontend) SelectMergeStacktraces ¶
func (*Frontend) SelectSeries ¶
type TimeInterval ¶
type TimeIntervalIterator ¶
type TimeIntervalIterator struct {
// contains filtered or unexported fields
}
TimeIntervalIterator splits a time range into non-overlapping sub-ranges, where the boundary adjoining on the left is not included, e.g:
[t1, t2), [t3, t4), ..., [tn-1, tn].
By default, a sub-range start time is a multiple of the interval. See WithAlignment option, if a custom alignment is needed.
func NewTimeIntervalIterator ¶
func NewTimeIntervalIterator(startTime, endTime time.Time, interval time.Duration, options ...TimeIntervalIteratorOption) *TimeIntervalIterator
NewTimeIntervalIterator returns a new interval iterator. If the interval is zero, the entire time span is taken as a single interval.
func (*TimeIntervalIterator) At ¶
func (i *TimeIntervalIterator) At() TimeInterval
func (*TimeIntervalIterator) Close ¶
func (*TimeIntervalIterator) Close() error
func (*TimeIntervalIterator) Err ¶
func (*TimeIntervalIterator) Err() error
func (*TimeIntervalIterator) Next ¶
func (i *TimeIntervalIterator) Next() bool
type TimeIntervalIteratorOption ¶
type TimeIntervalIteratorOption func(*TimeIntervalIterator)
func WithAlignment ¶
func WithAlignment(a time.Duration) TimeIntervalIteratorOption
WithAlignment causes a sub-range start time to be a multiple of the alignment. This makes it possible for a sub-range to be shorter than the interval specified, but not more than by the alignment.
The interval can't be less than the alignment.
Source Files ¶
- frontend.go
- frontend_analyze_query.go
- frontend_diff.go
- frontend_get_profile_stats.go
- frontend_label_names.go
- frontend_label_values.go
- frontend_profile_types.go
- frontend_scheduler_worker.go
- frontend_select_merge_profile.go
- frontend_select_merge_span_profile.go
- frontend_select_merge_stacktraces.go
- frontend_select_time_series.go
- frontend_series_labels.go
- split_by_interval.go
Directories ¶
Path | Synopsis |
---|---|
dot
|
|
graph
Package graph collects a set of samples into a directed graph.
|
Package graph collects a set of samples into a directed graph. |
measurement
Package measurement export utility functions to manipulate/format performance profile sample values.
|
Package measurement export utility functions to manipulate/format performance profile sample values. |
report
Package report summarizes a performance profile into a human-readable report.
|
Package report summarizes a performance profile into a human-readable report. |