Documentation ¶
Index ¶
- Constants
- Variables
- func NewLabelsTripperware(cfg Config, log log.Logger, limits Limits, codec queryrange.Codec, ...) (queryrange.Tripperware, error)
- func NewLimitedRoundTripper(next http.RoundTripper, codec queryrange.Codec, limits Limits, ...) http.RoundTripper
- func NewLogFilterTripperware(cfg Config, log log.Logger, limits Limits, schema chunk.SchemaConfig, ...) (queryrange.Tripperware, error)
- func NewQueryShardMiddleware(logger log.Logger, confs queryrange.ShardingConfigs, ...) queryrange.Middleware
- func NewSeriesTripperware(cfg Config, log log.Logger, limits Limits, codec queryrange.Codec, ...) (queryrange.Tripperware, error)
- func ResponseToResult(resp queryrange.Response) (logqlmodel.Result, error)
- func SplitByIntervalMiddleware(limits Limits, merger queryrange.Merger, splitter Splitter, ...) queryrange.Middleware
- func StatsCollectorMiddleware() queryrange.Middleware
- type Config
- type DownstreamHandler
- type Limits
- type LokiData
- func (*LokiData) Descriptor() ([]byte, []int)
- func (this *LokiData) Equal(that interface{}) bool
- func (m *LokiData) GetResultType() string
- func (this *LokiData) GoString() string
- func (m *LokiData) Marshal() (dAtA []byte, err error)
- func (m *LokiData) MarshalTo(dAtA []byte) (int, error)
- func (*LokiData) ProtoMessage()
- func (m *LokiData) Reset()
- func (m *LokiData) Size() (n int)
- func (this *LokiData) String() string
- func (m *LokiData) Unmarshal(dAtA []byte) error
- func (m *LokiData) XXX_DiscardUnknown()
- func (m *LokiData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiData) XXX_Merge(src proto.Message)
- func (m *LokiData) XXX_Size() int
- func (m *LokiData) XXX_Unmarshal(b []byte) error
- type LokiLabelNamesRequest
- func (*LokiLabelNamesRequest) Descriptor() ([]byte, []int)
- func (this *LokiLabelNamesRequest) Equal(that interface{}) bool
- func (*LokiLabelNamesRequest) GetCachingOptions() (res queryrange.CachingOptions)
- func (r *LokiLabelNamesRequest) GetEnd() int64
- func (m *LokiLabelNamesRequest) GetEndTs() time.Time
- func (m *LokiLabelNamesRequest) GetPath() string
- func (r *LokiLabelNamesRequest) GetQuery() string
- func (r *LokiLabelNamesRequest) GetStart() int64
- func (m *LokiLabelNamesRequest) GetStartTs() time.Time
- func (r *LokiLabelNamesRequest) GetStep() int64
- func (this *LokiLabelNamesRequest) GoString() string
- func (r *LokiLabelNamesRequest) LogToSpan(sp opentracing.Span)
- func (m *LokiLabelNamesRequest) Marshal() (dAtA []byte, err error)
- func (m *LokiLabelNamesRequest) MarshalTo(dAtA []byte) (int, error)
- func (*LokiLabelNamesRequest) ProtoMessage()
- func (m *LokiLabelNamesRequest) Reset()
- func (m *LokiLabelNamesRequest) Size() (n int)
- func (this *LokiLabelNamesRequest) String() string
- func (m *LokiLabelNamesRequest) Unmarshal(dAtA []byte) error
- func (r *LokiLabelNamesRequest) WithQuery(query string) queryrange.Request
- func (r *LokiLabelNamesRequest) WithStartEnd(s int64, e int64) queryrange.Request
- func (m *LokiLabelNamesRequest) XXX_DiscardUnknown()
- func (m *LokiLabelNamesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiLabelNamesRequest) XXX_Merge(src proto.Message)
- func (m *LokiLabelNamesRequest) XXX_Size() int
- func (m *LokiLabelNamesRequest) XXX_Unmarshal(b []byte) error
- type LokiLabelNamesResponse
- func (*LokiLabelNamesResponse) Descriptor() ([]byte, []int)
- func (this *LokiLabelNamesResponse) Equal(that interface{}) bool
- func (m *LokiLabelNamesResponse) GetData() []string
- func (m *LokiLabelNamesResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
- func (m *LokiLabelNamesResponse) GetStatus() string
- func (m *LokiLabelNamesResponse) GetVersion() uint32
- func (this *LokiLabelNamesResponse) GoString() string
- func (m *LokiLabelNamesResponse) Marshal() (dAtA []byte, err error)
- func (m *LokiLabelNamesResponse) MarshalTo(dAtA []byte) (int, error)
- func (*LokiLabelNamesResponse) ProtoMessage()
- func (m *LokiLabelNamesResponse) Reset()
- func (m *LokiLabelNamesResponse) Size() (n int)
- func (this *LokiLabelNamesResponse) String() string
- func (m *LokiLabelNamesResponse) Unmarshal(dAtA []byte) error
- func (m *LokiLabelNamesResponse) XXX_DiscardUnknown()
- func (m *LokiLabelNamesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiLabelNamesResponse) XXX_Merge(src proto.Message)
- func (m *LokiLabelNamesResponse) XXX_Size() int
- func (m *LokiLabelNamesResponse) XXX_Unmarshal(b []byte) error
- type LokiPromResponse
- func (*LokiPromResponse) Descriptor() ([]byte, []int)
- func (this *LokiPromResponse) Equal(that interface{}) bool
- func (m *LokiPromResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
- func (m *LokiPromResponse) GetResponse() *queryrange.PrometheusResponse
- func (m *LokiPromResponse) GetStatistics() stats.Result
- func (this *LokiPromResponse) GoString() string
- func (m *LokiPromResponse) Marshal() (dAtA []byte, err error)
- func (m *LokiPromResponse) MarshalTo(dAtA []byte) (int, error)
- func (*LokiPromResponse) ProtoMessage()
- func (m *LokiPromResponse) Reset()
- func (m *LokiPromResponse) Size() (n int)
- func (this *LokiPromResponse) String() string
- func (m *LokiPromResponse) Unmarshal(dAtA []byte) error
- func (m *LokiPromResponse) XXX_DiscardUnknown()
- func (m *LokiPromResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiPromResponse) XXX_Merge(src proto.Message)
- func (m *LokiPromResponse) XXX_Size() int
- func (m *LokiPromResponse) XXX_Unmarshal(b []byte) error
- type LokiRequest
- func (*LokiRequest) Descriptor() ([]byte, []int)
- func (this *LokiRequest) Equal(that interface{}) bool
- func (*LokiRequest) GetCachingOptions() (res queryrange.CachingOptions)
- func (m *LokiRequest) GetDirection() logproto.Direction
- func (r *LokiRequest) GetEnd() int64
- func (m *LokiRequest) GetEndTs() time.Time
- func (m *LokiRequest) GetLimit() uint32
- func (m *LokiRequest) GetPath() string
- func (m *LokiRequest) GetQuery() string
- func (m *LokiRequest) GetShards() []string
- func (r *LokiRequest) GetStart() int64
- func (m *LokiRequest) GetStartTs() time.Time
- func (m *LokiRequest) GetStep() int64
- func (this *LokiRequest) GoString() string
- func (r *LokiRequest) LogToSpan(sp opentracing.Span)
- func (m *LokiRequest) Marshal() (dAtA []byte, err error)
- func (m *LokiRequest) MarshalTo(dAtA []byte) (int, error)
- func (*LokiRequest) ProtoMessage()
- func (m *LokiRequest) Reset()
- func (m *LokiRequest) Size() (n int)
- func (this *LokiRequest) String() string
- func (m *LokiRequest) Unmarshal(dAtA []byte) error
- func (r *LokiRequest) WithQuery(query string) queryrange.Request
- func (r *LokiRequest) WithShards(shards logql.Shards) *LokiRequest
- func (r *LokiRequest) WithStartEnd(s int64, e int64) queryrange.Request
- func (m *LokiRequest) XXX_DiscardUnknown()
- func (m *LokiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiRequest) XXX_Merge(src proto.Message)
- func (m *LokiRequest) XXX_Size() int
- func (m *LokiRequest) XXX_Unmarshal(b []byte) error
- type LokiResponse
- func (res LokiResponse) Count() int64
- func (*LokiResponse) Descriptor() ([]byte, []int)
- func (this *LokiResponse) Equal(that interface{}) bool
- func (m *LokiResponse) GetData() LokiData
- func (m *LokiResponse) GetDirection() logproto.Direction
- func (m *LokiResponse) GetError() string
- func (m *LokiResponse) GetErrorType() string
- func (m *LokiResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
- func (m *LokiResponse) GetLimit() uint32
- func (m *LokiResponse) GetStatistics() stats.Result
- func (m *LokiResponse) GetStatus() string
- func (m *LokiResponse) GetVersion() uint32
- func (this *LokiResponse) GoString() string
- func (m *LokiResponse) Marshal() (dAtA []byte, err error)
- func (m *LokiResponse) MarshalTo(dAtA []byte) (int, error)
- func (*LokiResponse) ProtoMessage()
- func (m *LokiResponse) Reset()
- func (m *LokiResponse) Size() (n int)
- func (this *LokiResponse) String() string
- func (m *LokiResponse) Unmarshal(dAtA []byte) error
- func (m *LokiResponse) XXX_DiscardUnknown()
- func (m *LokiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiResponse) XXX_Merge(src proto.Message)
- func (m *LokiResponse) XXX_Size() int
- func (m *LokiResponse) XXX_Unmarshal(b []byte) error
- type LokiSeriesRequest
- func (*LokiSeriesRequest) Descriptor() ([]byte, []int)
- func (this *LokiSeriesRequest) Equal(that interface{}) bool
- func (*LokiSeriesRequest) GetCachingOptions() (res queryrange.CachingOptions)
- func (r *LokiSeriesRequest) GetEnd() int64
- func (m *LokiSeriesRequest) GetEndTs() time.Time
- func (m *LokiSeriesRequest) GetMatch() []string
- func (m *LokiSeriesRequest) GetPath() string
- func (r *LokiSeriesRequest) GetQuery() string
- func (r *LokiSeriesRequest) GetStart() int64
- func (m *LokiSeriesRequest) GetStartTs() time.Time
- func (r *LokiSeriesRequest) GetStep() int64
- func (this *LokiSeriesRequest) GoString() string
- func (r *LokiSeriesRequest) LogToSpan(sp opentracing.Span)
- func (m *LokiSeriesRequest) Marshal() (dAtA []byte, err error)
- func (m *LokiSeriesRequest) MarshalTo(dAtA []byte) (int, error)
- func (*LokiSeriesRequest) ProtoMessage()
- func (m *LokiSeriesRequest) Reset()
- func (m *LokiSeriesRequest) Size() (n int)
- func (this *LokiSeriesRequest) String() string
- func (m *LokiSeriesRequest) Unmarshal(dAtA []byte) error
- func (r *LokiSeriesRequest) WithQuery(query string) queryrange.Request
- func (r *LokiSeriesRequest) WithStartEnd(s int64, e int64) queryrange.Request
- func (m *LokiSeriesRequest) XXX_DiscardUnknown()
- func (m *LokiSeriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiSeriesRequest) XXX_Merge(src proto.Message)
- func (m *LokiSeriesRequest) XXX_Size() int
- func (m *LokiSeriesRequest) XXX_Unmarshal(b []byte) error
- type LokiSeriesResponse
- func (*LokiSeriesResponse) Descriptor() ([]byte, []int)
- func (this *LokiSeriesResponse) Equal(that interface{}) bool
- func (m *LokiSeriesResponse) GetData() []logproto.SeriesIdentifier
- func (m *LokiSeriesResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
- func (m *LokiSeriesResponse) GetStatus() string
- func (m *LokiSeriesResponse) GetVersion() uint32
- func (this *LokiSeriesResponse) GoString() string
- func (m *LokiSeriesResponse) Marshal() (dAtA []byte, err error)
- func (m *LokiSeriesResponse) MarshalTo(dAtA []byte) (int, error)
- func (*LokiSeriesResponse) ProtoMessage()
- func (m *LokiSeriesResponse) Reset()
- func (m *LokiSeriesResponse) Size() (n int)
- func (this *LokiSeriesResponse) String() string
- func (m *LokiSeriesResponse) Unmarshal(dAtA []byte) error
- func (m *LokiSeriesResponse) XXX_DiscardUnknown()
- func (m *LokiSeriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiSeriesResponse) XXX_Merge(src proto.Message)
- func (m *LokiSeriesResponse) XXX_Size() int
- func (m *LokiSeriesResponse) XXX_Unmarshal(b []byte) error
- type PrometheusExtractor
- type SplitByMetrics
- type Splitter
- type Stopper
Constants ¶
const ( QueryRangeOp = "query_range" SeriesOp = "series" LabelNamesOp = "labels" )
const (
DefaultDownstreamConcurrency = 32
)
Variables ¶
var ( ErrInvalidLengthQueryrange = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQueryrange = fmt.Errorf("proto: integer overflow") )
var ( // StatsHTTPMiddleware is an http middleware to record stats for query_range filter. StatsHTTPMiddleware middleware.Interface = statsHTTPMiddleware(defaultMetricRecorder) )
Functions ¶
func NewLabelsTripperware ¶
func NewLabelsTripperware( cfg Config, log log.Logger, limits Limits, codec queryrange.Codec, instrumentMetrics *queryrange.InstrumentMiddlewareMetrics, retryMiddlewareMetrics *queryrange.RetryMiddlewareMetrics, splitByMetrics *SplitByMetrics, ) (queryrange.Tripperware, error)
NewLabelsTripperware creates a new frontend tripperware responsible for handling labels requests.
func NewLimitedRoundTripper ¶
func NewLimitedRoundTripper(next http.RoundTripper, codec queryrange.Codec, limits Limits, middlewares ...queryrange.Middleware) http.RoundTripper
NewLimitedRoundTripper creates a new roundtripper that enforces MaxQueryParallelism to the `next` roundtripper across `middlewares`.
func NewLogFilterTripperware ¶
func NewLogFilterTripperware( cfg Config, log log.Logger, limits Limits, schema chunk.SchemaConfig, minShardingLookback time.Duration, codec queryrange.Codec, instrumentMetrics *queryrange.InstrumentMiddlewareMetrics, retryMiddlewareMetrics *queryrange.RetryMiddlewareMetrics, shardingMetrics *logql.ShardingMetrics, splitByMetrics *SplitByMetrics, ) (queryrange.Tripperware, error)
NewLogFilterTripperware creates a new frontend tripperware responsible for handling log requests with regex.
func NewQueryShardMiddleware ¶
func NewQueryShardMiddleware( logger log.Logger, confs queryrange.ShardingConfigs, minShardingLookback time.Duration, middlewareMetrics *queryrange.InstrumentMiddlewareMetrics, shardingMetrics *logql.ShardingMetrics, limits logql.Limits, ) queryrange.Middleware
NewQueryShardMiddleware creates a middleware which downstreams queries after AST mapping and query encoding.
func NewSeriesTripperware ¶
func NewSeriesTripperware( cfg Config, log log.Logger, limits Limits, codec queryrange.Codec, instrumentMetrics *queryrange.InstrumentMiddlewareMetrics, retryMiddlewareMetrics *queryrange.RetryMiddlewareMetrics, splitByMetrics *SplitByMetrics, ) (queryrange.Tripperware, error)
NewSeriesripperware creates a new frontend tripperware responsible for handling series requests
func ResponseToResult ¶
func ResponseToResult(resp queryrange.Response) (logqlmodel.Result, error)
func SplitByIntervalMiddleware ¶
func SplitByIntervalMiddleware(limits Limits, merger queryrange.Merger, splitter Splitter, metrics *SplitByMetrics) queryrange.Middleware
SplitByIntervalMiddleware creates a new Middleware that splits log requests by a given interval.
func StatsCollectorMiddleware ¶
func StatsCollectorMiddleware() queryrange.Middleware
StatsCollectorMiddleware compute the stats summary based on the actual duration of the request and inject it in the request context.
Types ¶
type Config ¶
type Config struct {
queryrange.Config `yaml:",inline"`
}
Config is the configuration for the queryrange tripperware
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to configure this flag set.
type DownstreamHandler ¶
type DownstreamHandler struct {
// contains filtered or unexported fields
}
func (DownstreamHandler) Downstreamer ¶
func (h DownstreamHandler) Downstreamer() logql.Downstreamer
type Limits ¶
type Limits interface { queryrange.Limits QuerySplitDuration(string) time.Duration MaxQuerySeries(string) int MaxEntriesLimitPerQuery(string) int }
Limits extends the cortex limits interface with support for per tenant splitby parameters
func WithDefaultLimits ¶
func WithDefaultLimits(l Limits, conf queryrange.Config) Limits
WithDefaults will construct a Limits with a default value for QuerySplitDuration when no overrides are present.
type LokiData ¶
type LokiData struct { ResultType string `protobuf:"bytes,1,opt,name=ResultType,proto3" json:"resultType"` Result []github_com_grafarg_loki_pkg_logproto.Stream `protobuf:"bytes,2,rep,name=Result,proto3,customtype=github.com/famarker/loki/pkg/logproto.Stream" json:"result"` }
func (*LokiData) Descriptor ¶
func (*LokiData) GetResultType ¶
func (*LokiData) ProtoMessage ¶
func (*LokiData) ProtoMessage()
func (*LokiData) XXX_DiscardUnknown ¶
func (m *LokiData) XXX_DiscardUnknown()
func (*LokiData) XXX_Marshal ¶
func (*LokiData) XXX_Unmarshal ¶
type LokiLabelNamesRequest ¶
type LokiLabelNamesRequest struct { StartTs time.Time `protobuf:"bytes,1,opt,name=startTs,proto3,stdtime" json:"startTs"` EndTs time.Time `protobuf:"bytes,2,opt,name=endTs,proto3,stdtime" json:"endTs"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` }
func (*LokiLabelNamesRequest) Descriptor ¶
func (*LokiLabelNamesRequest) Descriptor() ([]byte, []int)
func (*LokiLabelNamesRequest) Equal ¶
func (this *LokiLabelNamesRequest) Equal(that interface{}) bool
func (*LokiLabelNamesRequest) GetCachingOptions ¶
func (*LokiLabelNamesRequest) GetCachingOptions() (res queryrange.CachingOptions)
func (*LokiLabelNamesRequest) GetEnd ¶
func (r *LokiLabelNamesRequest) GetEnd() int64
func (*LokiLabelNamesRequest) GetEndTs ¶
func (m *LokiLabelNamesRequest) GetEndTs() time.Time
func (*LokiLabelNamesRequest) GetPath ¶
func (m *LokiLabelNamesRequest) GetPath() string
func (*LokiLabelNamesRequest) GetQuery ¶
func (r *LokiLabelNamesRequest) GetQuery() string
func (*LokiLabelNamesRequest) GetStart ¶
func (r *LokiLabelNamesRequest) GetStart() int64
func (*LokiLabelNamesRequest) GetStartTs ¶
func (m *LokiLabelNamesRequest) GetStartTs() time.Time
func (*LokiLabelNamesRequest) GetStep ¶
func (r *LokiLabelNamesRequest) GetStep() int64
func (*LokiLabelNamesRequest) GoString ¶
func (this *LokiLabelNamesRequest) GoString() string
func (*LokiLabelNamesRequest) LogToSpan ¶
func (r *LokiLabelNamesRequest) LogToSpan(sp opentracing.Span)
func (*LokiLabelNamesRequest) Marshal ¶
func (m *LokiLabelNamesRequest) Marshal() (dAtA []byte, err error)
func (*LokiLabelNamesRequest) MarshalTo ¶
func (m *LokiLabelNamesRequest) MarshalTo(dAtA []byte) (int, error)
func (*LokiLabelNamesRequest) ProtoMessage ¶
func (*LokiLabelNamesRequest) ProtoMessage()
func (*LokiLabelNamesRequest) Reset ¶
func (m *LokiLabelNamesRequest) Reset()
func (*LokiLabelNamesRequest) Size ¶
func (m *LokiLabelNamesRequest) Size() (n int)
func (*LokiLabelNamesRequest) String ¶
func (this *LokiLabelNamesRequest) String() string
func (*LokiLabelNamesRequest) Unmarshal ¶
func (m *LokiLabelNamesRequest) Unmarshal(dAtA []byte) error
func (*LokiLabelNamesRequest) WithQuery ¶
func (r *LokiLabelNamesRequest) WithQuery(query string) queryrange.Request
func (*LokiLabelNamesRequest) WithStartEnd ¶
func (r *LokiLabelNamesRequest) WithStartEnd(s int64, e int64) queryrange.Request
func (*LokiLabelNamesRequest) XXX_DiscardUnknown ¶
func (m *LokiLabelNamesRequest) XXX_DiscardUnknown()
func (*LokiLabelNamesRequest) XXX_Marshal ¶
func (m *LokiLabelNamesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiLabelNamesRequest) XXX_Merge ¶
func (m *LokiLabelNamesRequest) XXX_Merge(src proto.Message)
func (*LokiLabelNamesRequest) XXX_Size ¶
func (m *LokiLabelNamesRequest) XXX_Size() int
func (*LokiLabelNamesRequest) XXX_Unmarshal ¶
func (m *LokiLabelNamesRequest) XXX_Unmarshal(b []byte) error
type LokiLabelNamesResponse ¶
type LokiLabelNamesResponse struct { Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` Data []string `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"` Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` Headers []github_com_cortexproject_cortex_pkg_querier_queryrange.PrometheusResponseHeader `` /* 142-byte string literal not displayed */ }
func (*LokiLabelNamesResponse) Descriptor ¶
func (*LokiLabelNamesResponse) Descriptor() ([]byte, []int)
func (*LokiLabelNamesResponse) Equal ¶
func (this *LokiLabelNamesResponse) Equal(that interface{}) bool
func (*LokiLabelNamesResponse) GetData ¶
func (m *LokiLabelNamesResponse) GetData() []string
func (*LokiLabelNamesResponse) GetHeaders ¶
func (m *LokiLabelNamesResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
func (*LokiLabelNamesResponse) GetStatus ¶
func (m *LokiLabelNamesResponse) GetStatus() string
func (*LokiLabelNamesResponse) GetVersion ¶
func (m *LokiLabelNamesResponse) GetVersion() uint32
func (*LokiLabelNamesResponse) GoString ¶
func (this *LokiLabelNamesResponse) GoString() string
func (*LokiLabelNamesResponse) Marshal ¶
func (m *LokiLabelNamesResponse) Marshal() (dAtA []byte, err error)
func (*LokiLabelNamesResponse) MarshalTo ¶
func (m *LokiLabelNamesResponse) MarshalTo(dAtA []byte) (int, error)
func (*LokiLabelNamesResponse) ProtoMessage ¶
func (*LokiLabelNamesResponse) ProtoMessage()
func (*LokiLabelNamesResponse) Reset ¶
func (m *LokiLabelNamesResponse) Reset()
func (*LokiLabelNamesResponse) Size ¶
func (m *LokiLabelNamesResponse) Size() (n int)
func (*LokiLabelNamesResponse) String ¶
func (this *LokiLabelNamesResponse) String() string
func (*LokiLabelNamesResponse) Unmarshal ¶
func (m *LokiLabelNamesResponse) Unmarshal(dAtA []byte) error
func (*LokiLabelNamesResponse) XXX_DiscardUnknown ¶
func (m *LokiLabelNamesResponse) XXX_DiscardUnknown()
func (*LokiLabelNamesResponse) XXX_Marshal ¶
func (m *LokiLabelNamesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiLabelNamesResponse) XXX_Merge ¶
func (m *LokiLabelNamesResponse) XXX_Merge(src proto.Message)
func (*LokiLabelNamesResponse) XXX_Size ¶
func (m *LokiLabelNamesResponse) XXX_Size() int
func (*LokiLabelNamesResponse) XXX_Unmarshal ¶
func (m *LokiLabelNamesResponse) XXX_Unmarshal(b []byte) error
type LokiPromResponse ¶
type LokiPromResponse struct { Response *queryrange.PrometheusResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Statistics stats.Result `protobuf:"bytes,2,opt,name=statistics,proto3" json:"statistics"` }
LokiPromResponse wraps a Prometheus response with statistics.
func (*LokiPromResponse) Descriptor ¶
func (*LokiPromResponse) Descriptor() ([]byte, []int)
func (*LokiPromResponse) Equal ¶
func (this *LokiPromResponse) Equal(that interface{}) bool
func (*LokiPromResponse) GetHeaders ¶
func (m *LokiPromResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
func (*LokiPromResponse) GetResponse ¶
func (m *LokiPromResponse) GetResponse() *queryrange.PrometheusResponse
func (*LokiPromResponse) GetStatistics ¶
func (m *LokiPromResponse) GetStatistics() stats.Result
func (*LokiPromResponse) GoString ¶
func (this *LokiPromResponse) GoString() string
func (*LokiPromResponse) Marshal ¶
func (m *LokiPromResponse) Marshal() (dAtA []byte, err error)
func (*LokiPromResponse) ProtoMessage ¶
func (*LokiPromResponse) ProtoMessage()
func (*LokiPromResponse) Reset ¶
func (m *LokiPromResponse) Reset()
func (*LokiPromResponse) Size ¶
func (m *LokiPromResponse) Size() (n int)
func (*LokiPromResponse) String ¶
func (this *LokiPromResponse) String() string
func (*LokiPromResponse) Unmarshal ¶
func (m *LokiPromResponse) Unmarshal(dAtA []byte) error
func (*LokiPromResponse) XXX_DiscardUnknown ¶
func (m *LokiPromResponse) XXX_DiscardUnknown()
func (*LokiPromResponse) XXX_Marshal ¶
func (m *LokiPromResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiPromResponse) XXX_Merge ¶
func (m *LokiPromResponse) XXX_Merge(src proto.Message)
func (*LokiPromResponse) XXX_Size ¶
func (m *LokiPromResponse) XXX_Size() int
func (*LokiPromResponse) XXX_Unmarshal ¶
func (m *LokiPromResponse) XXX_Unmarshal(b []byte) error
type LokiRequest ¶
type LokiRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Step int64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` StartTs time.Time `protobuf:"bytes,4,opt,name=startTs,proto3,stdtime" json:"startTs"` EndTs time.Time `protobuf:"bytes,5,opt,name=endTs,proto3,stdtime" json:"endTs"` Direction logproto.Direction `protobuf:"varint,6,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` Path string `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"` Shards []string `protobuf:"bytes,8,rep,name=shards,proto3" json:"shards"` }
func ParamsToLokiRequest ¶
func ParamsToLokiRequest(params logql.Params) *LokiRequest
func (*LokiRequest) Descriptor ¶
func (*LokiRequest) Descriptor() ([]byte, []int)
func (*LokiRequest) Equal ¶
func (this *LokiRequest) Equal(that interface{}) bool
func (*LokiRequest) GetCachingOptions ¶
func (*LokiRequest) GetCachingOptions() (res queryrange.CachingOptions)
func (*LokiRequest) GetDirection ¶
func (m *LokiRequest) GetDirection() logproto.Direction
func (*LokiRequest) GetEnd ¶
func (r *LokiRequest) GetEnd() int64
func (*LokiRequest) GetEndTs ¶
func (m *LokiRequest) GetEndTs() time.Time
func (*LokiRequest) GetLimit ¶
func (m *LokiRequest) GetLimit() uint32
func (*LokiRequest) GetPath ¶
func (m *LokiRequest) GetPath() string
func (*LokiRequest) GetQuery ¶
func (m *LokiRequest) GetQuery() string
func (*LokiRequest) GetShards ¶
func (m *LokiRequest) GetShards() []string
func (*LokiRequest) GetStart ¶
func (r *LokiRequest) GetStart() int64
func (*LokiRequest) GetStartTs ¶
func (m *LokiRequest) GetStartTs() time.Time
func (*LokiRequest) GetStep ¶
func (m *LokiRequest) GetStep() int64
func (*LokiRequest) GoString ¶
func (this *LokiRequest) GoString() string
func (*LokiRequest) LogToSpan ¶
func (r *LokiRequest) LogToSpan(sp opentracing.Span)
func (*LokiRequest) Marshal ¶
func (m *LokiRequest) Marshal() (dAtA []byte, err error)
func (*LokiRequest) ProtoMessage ¶
func (*LokiRequest) ProtoMessage()
func (*LokiRequest) Reset ¶
func (m *LokiRequest) Reset()
func (*LokiRequest) Size ¶
func (m *LokiRequest) Size() (n int)
func (*LokiRequest) String ¶
func (this *LokiRequest) String() string
func (*LokiRequest) Unmarshal ¶
func (m *LokiRequest) Unmarshal(dAtA []byte) error
func (*LokiRequest) WithQuery ¶
func (r *LokiRequest) WithQuery(query string) queryrange.Request
func (*LokiRequest) WithShards ¶
func (r *LokiRequest) WithShards(shards logql.Shards) *LokiRequest
func (*LokiRequest) WithStartEnd ¶
func (r *LokiRequest) WithStartEnd(s int64, e int64) queryrange.Request
func (*LokiRequest) XXX_DiscardUnknown ¶
func (m *LokiRequest) XXX_DiscardUnknown()
func (*LokiRequest) XXX_Marshal ¶
func (m *LokiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiRequest) XXX_Merge ¶
func (m *LokiRequest) XXX_Merge(src proto.Message)
func (*LokiRequest) XXX_Size ¶
func (m *LokiRequest) XXX_Size() int
func (*LokiRequest) XXX_Unmarshal ¶
func (m *LokiRequest) XXX_Unmarshal(b []byte) error
type LokiResponse ¶
type LokiResponse struct { Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` Data LokiData `protobuf:"bytes,2,opt,name=Data,proto3" json:"data,omitempty"` ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"` Error string `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"` Direction logproto.Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` Limit uint32 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` Statistics stats.Result `protobuf:"bytes,8,opt,name=statistics,proto3" json:"statistics"` Headers []github_com_cortexproject_cortex_pkg_querier_queryrange.PrometheusResponseHeader `` /* 142-byte string literal not displayed */ }
func (LokiResponse) Count ¶
func (res LokiResponse) Count() int64
func (*LokiResponse) Descriptor ¶
func (*LokiResponse) Descriptor() ([]byte, []int)
func (*LokiResponse) Equal ¶
func (this *LokiResponse) Equal(that interface{}) bool
func (*LokiResponse) GetData ¶
func (m *LokiResponse) GetData() LokiData
func (*LokiResponse) GetDirection ¶
func (m *LokiResponse) GetDirection() logproto.Direction
func (*LokiResponse) GetError ¶
func (m *LokiResponse) GetError() string
func (*LokiResponse) GetErrorType ¶
func (m *LokiResponse) GetErrorType() string
func (*LokiResponse) GetHeaders ¶
func (m *LokiResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
func (*LokiResponse) GetLimit ¶
func (m *LokiResponse) GetLimit() uint32
func (*LokiResponse) GetStatistics ¶
func (m *LokiResponse) GetStatistics() stats.Result
func (*LokiResponse) GetStatus ¶
func (m *LokiResponse) GetStatus() string
func (*LokiResponse) GetVersion ¶
func (m *LokiResponse) GetVersion() uint32
func (*LokiResponse) GoString ¶
func (this *LokiResponse) GoString() string
func (*LokiResponse) Marshal ¶
func (m *LokiResponse) Marshal() (dAtA []byte, err error)
func (*LokiResponse) ProtoMessage ¶
func (*LokiResponse) ProtoMessage()
func (*LokiResponse) Reset ¶
func (m *LokiResponse) Reset()
func (*LokiResponse) Size ¶
func (m *LokiResponse) Size() (n int)
func (*LokiResponse) String ¶
func (this *LokiResponse) String() string
func (*LokiResponse) Unmarshal ¶
func (m *LokiResponse) Unmarshal(dAtA []byte) error
func (*LokiResponse) XXX_DiscardUnknown ¶
func (m *LokiResponse) XXX_DiscardUnknown()
func (*LokiResponse) XXX_Marshal ¶
func (m *LokiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiResponse) XXX_Merge ¶
func (m *LokiResponse) XXX_Merge(src proto.Message)
func (*LokiResponse) XXX_Size ¶
func (m *LokiResponse) XXX_Size() int
func (*LokiResponse) XXX_Unmarshal ¶
func (m *LokiResponse) XXX_Unmarshal(b []byte) error
type LokiSeriesRequest ¶
type LokiSeriesRequest struct { Match []string `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"` StartTs time.Time `protobuf:"bytes,2,opt,name=startTs,proto3,stdtime" json:"startTs"` EndTs time.Time `protobuf:"bytes,3,opt,name=endTs,proto3,stdtime" json:"endTs"` Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` }
func (*LokiSeriesRequest) Descriptor ¶
func (*LokiSeriesRequest) Descriptor() ([]byte, []int)
func (*LokiSeriesRequest) Equal ¶
func (this *LokiSeriesRequest) Equal(that interface{}) bool
func (*LokiSeriesRequest) GetCachingOptions ¶
func (*LokiSeriesRequest) GetCachingOptions() (res queryrange.CachingOptions)
func (*LokiSeriesRequest) GetEnd ¶
func (r *LokiSeriesRequest) GetEnd() int64
func (*LokiSeriesRequest) GetEndTs ¶
func (m *LokiSeriesRequest) GetEndTs() time.Time
func (*LokiSeriesRequest) GetMatch ¶
func (m *LokiSeriesRequest) GetMatch() []string
func (*LokiSeriesRequest) GetPath ¶
func (m *LokiSeriesRequest) GetPath() string
func (*LokiSeriesRequest) GetQuery ¶
func (r *LokiSeriesRequest) GetQuery() string
func (*LokiSeriesRequest) GetStart ¶
func (r *LokiSeriesRequest) GetStart() int64
func (*LokiSeriesRequest) GetStartTs ¶
func (m *LokiSeriesRequest) GetStartTs() time.Time
func (*LokiSeriesRequest) GetStep ¶
func (r *LokiSeriesRequest) GetStep() int64
func (*LokiSeriesRequest) GoString ¶
func (this *LokiSeriesRequest) GoString() string
func (*LokiSeriesRequest) LogToSpan ¶
func (r *LokiSeriesRequest) LogToSpan(sp opentracing.Span)
func (*LokiSeriesRequest) Marshal ¶
func (m *LokiSeriesRequest) Marshal() (dAtA []byte, err error)
func (*LokiSeriesRequest) MarshalTo ¶
func (m *LokiSeriesRequest) MarshalTo(dAtA []byte) (int, error)
func (*LokiSeriesRequest) ProtoMessage ¶
func (*LokiSeriesRequest) ProtoMessage()
func (*LokiSeriesRequest) Reset ¶
func (m *LokiSeriesRequest) Reset()
func (*LokiSeriesRequest) Size ¶
func (m *LokiSeriesRequest) Size() (n int)
func (*LokiSeriesRequest) String ¶
func (this *LokiSeriesRequest) String() string
func (*LokiSeriesRequest) Unmarshal ¶
func (m *LokiSeriesRequest) Unmarshal(dAtA []byte) error
func (*LokiSeriesRequest) WithQuery ¶
func (r *LokiSeriesRequest) WithQuery(query string) queryrange.Request
func (*LokiSeriesRequest) WithStartEnd ¶
func (r *LokiSeriesRequest) WithStartEnd(s int64, e int64) queryrange.Request
func (*LokiSeriesRequest) XXX_DiscardUnknown ¶
func (m *LokiSeriesRequest) XXX_DiscardUnknown()
func (*LokiSeriesRequest) XXX_Marshal ¶
func (m *LokiSeriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiSeriesRequest) XXX_Merge ¶
func (m *LokiSeriesRequest) XXX_Merge(src proto.Message)
func (*LokiSeriesRequest) XXX_Size ¶
func (m *LokiSeriesRequest) XXX_Size() int
func (*LokiSeriesRequest) XXX_Unmarshal ¶
func (m *LokiSeriesRequest) XXX_Unmarshal(b []byte) error
type LokiSeriesResponse ¶
type LokiSeriesResponse struct { Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` Data []logproto.SeriesIdentifier `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"` Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` Headers []github_com_cortexproject_cortex_pkg_querier_queryrange.PrometheusResponseHeader `` /* 142-byte string literal not displayed */ }
func (*LokiSeriesResponse) Descriptor ¶
func (*LokiSeriesResponse) Descriptor() ([]byte, []int)
func (*LokiSeriesResponse) Equal ¶
func (this *LokiSeriesResponse) Equal(that interface{}) bool
func (*LokiSeriesResponse) GetData ¶
func (m *LokiSeriesResponse) GetData() []logproto.SeriesIdentifier
func (*LokiSeriesResponse) GetHeaders ¶
func (m *LokiSeriesResponse) GetHeaders() []*queryrange.PrometheusResponseHeader
func (*LokiSeriesResponse) GetStatus ¶
func (m *LokiSeriesResponse) GetStatus() string
func (*LokiSeriesResponse) GetVersion ¶
func (m *LokiSeriesResponse) GetVersion() uint32
func (*LokiSeriesResponse) GoString ¶
func (this *LokiSeriesResponse) GoString() string
func (*LokiSeriesResponse) Marshal ¶
func (m *LokiSeriesResponse) Marshal() (dAtA []byte, err error)
func (*LokiSeriesResponse) MarshalTo ¶
func (m *LokiSeriesResponse) MarshalTo(dAtA []byte) (int, error)
func (*LokiSeriesResponse) ProtoMessage ¶
func (*LokiSeriesResponse) ProtoMessage()
func (*LokiSeriesResponse) Reset ¶
func (m *LokiSeriesResponse) Reset()
func (*LokiSeriesResponse) Size ¶
func (m *LokiSeriesResponse) Size() (n int)
func (*LokiSeriesResponse) String ¶
func (this *LokiSeriesResponse) String() string
func (*LokiSeriesResponse) Unmarshal ¶
func (m *LokiSeriesResponse) Unmarshal(dAtA []byte) error
func (*LokiSeriesResponse) XXX_DiscardUnknown ¶
func (m *LokiSeriesResponse) XXX_DiscardUnknown()
func (*LokiSeriesResponse) XXX_Marshal ¶
func (m *LokiSeriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiSeriesResponse) XXX_Merge ¶
func (m *LokiSeriesResponse) XXX_Merge(src proto.Message)
func (*LokiSeriesResponse) XXX_Size ¶
func (m *LokiSeriesResponse) XXX_Size() int
func (*LokiSeriesResponse) XXX_Unmarshal ¶
func (m *LokiSeriesResponse) XXX_Unmarshal(b []byte) error
type PrometheusExtractor ¶
type PrometheusExtractor struct{}
PrometheusExtractor implements Extractor interface
func (PrometheusExtractor) Extract ¶
func (PrometheusExtractor) Extract(start, end int64, from queryrange.Response) queryrange.Response
Extract wraps the original prometheus cache extractor
func (PrometheusExtractor) ResponseWithoutHeaders ¶
func (PrometheusExtractor) ResponseWithoutHeaders(resp queryrange.Response) queryrange.Response
ResponseWithoutHeaders wraps the original prometheus caching without headers
type SplitByMetrics ¶
type SplitByMetrics struct {
// contains filtered or unexported fields
}
func NewSplitByMetrics ¶
func NewSplitByMetrics(r prometheus.Registerer) *SplitByMetrics
type Splitter ¶
type Splitter func(req queryrange.Request, interval time.Duration) []queryrange.Request
type Stopper ¶
type Stopper interface {
Stop()
}
Stopper gracefully shutdown resources created
func NewMetricTripperware ¶
func NewMetricTripperware( cfg Config, log log.Logger, limits Limits, schema chunk.SchemaConfig, minShardingLookback time.Duration, codec queryrange.Codec, extractor queryrange.Extractor, instrumentMetrics *queryrange.InstrumentMiddlewareMetrics, retryMiddlewareMetrics *queryrange.RetryMiddlewareMetrics, shardingMetrics *logql.ShardingMetrics, splitByMetrics *SplitByMetrics, registerer prometheus.Registerer, ) (queryrange.Tripperware, Stopper, error)
NewMetricTripperware creates a new frontend tripperware responsible for handling metric queries
func NewTripperware ¶
func NewTripperware( cfg Config, log log.Logger, limits Limits, schema chunk.SchemaConfig, minShardingLookback time.Duration, registerer prometheus.Registerer, ) (queryrange.Tripperware, Stopper, error)
NewTripperware returns a Tripperware configured with middlewares to align, split and cache requests.