limits

package
v3.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInternalStreamsDrilldownOnly = fmt.Errorf("internal streams can only be queried from Logs Drilldown")

Functions

func ValidateAggregatedMetricQuery added in v3.5.0

func ValidateAggregatedMetricQuery(ctx context.Context, req logql.QueryParams) error

ValidateAggregatedMetricQuery checks if the query is accessing __aggregated_metric__ or __pattern__ streams and ensures that only queries from Grafana Explore Logs can access them.

func ValidateQueryRequest added in v3.5.0

func ValidateQueryRequest(ctx context.Context, req logql.QueryParams, limits Limits) (time.Time, time.Time, error)

func ValidateQueryTimeRangeLimits added in v3.5.0

func ValidateQueryTimeRangeLimits(ctx context.Context, userID string, limits TimeRangeLimits, from, through time.Time) (time.Time, time.Time, error)

Types

type Limits

type Limits interface {
	logql.Limits
	pattern.Limits
	TimeRangeLimits
	QueryTimeout(context.Context, string) time.Duration
	MaxStreamsMatchersPerQuery(context.Context, string) int
	MaxConcurrentTailRequests(context.Context, string) int
	MaxEntriesLimitPerQuery(context.Context, string) int
}

type TimeRangeLimits

type TimeRangeLimits interface {
	MaxQueryLookback(context.Context, string) time.Duration
	MaxQueryLength(context.Context, string) time.Duration
}

Jump to

Keyboard shortcuts

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