Documentation ¶
Index ¶
Constants ¶
View Source
const PackedEntryKey = "_entry"
PackedEntryKey is a special JSON key used by the pack promtail stage and unpack parser
View Source
const ValueTypeStreams = "streams"
ValueTypeStreams promql.ValueType for log streams
Variables ¶
View Source
var ( ErrParse = errors.New("failed to parse the log query") ErrPipeline = errors.New("failed execute pipeline") ErrLimit = errors.New("limit reached while evaluating the query") ErrIntervalLimit = errors.New("[interval] value exceeds limit") ErrBlocked = errors.New("query blocked by policy") ErrParseMatchers = errors.New("only label matchers are supported") ErrorLabel = "__error__" PreserveErrorLabel = "__preserve_error__" ErrorDetailsLabel = "__error_details__" )
Those errors are useful for comparing error returned by the engine. e.g. errors.Is(err,logqlmodel.ErrParse) let you know if this is a ast parsing error.
Functions ¶
This section is empty.
Types ¶
type LimitError ¶
type LimitError struct {
// contains filtered or unexported fields
}
func NewSeriesLimitError ¶
func NewSeriesLimitError(limit int) *LimitError
func (LimitError) Is ¶
func (e LimitError) Is(target error) bool
Is allows to use errors.Is(err,ErrLimit) on this error.
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
ParseError is what is returned when we failed to parse.
func NewParseError ¶
func NewParseError(msg string, line, col int) ParseError
func NewStageError ¶
func NewStageError(expr string, err error) ParseError
func (ParseError) Error ¶
func (p ParseError) Error() string
func (ParseError) Is ¶
func (p ParseError) Is(target error) bool
Is allows to use errors.Is(err,ErrParse) on this error.
type PipelineError ¶
type PipelineError struct {
// contains filtered or unexported fields
}
func NewPipelineErr ¶
func NewPipelineErr(metric labels.Labels) *PipelineError
func (PipelineError) Error ¶
func (e PipelineError) Error() string
func (PipelineError) Is ¶
func (e PipelineError) Is(target error) bool
Is allows to use errors.Is(err,ErrPipeline) on this error.
type Result ¶
type Result struct { Data parser.Value Statistics stats.Result Headers []*definitions.PrometheusResponseHeader Warnings []string }
Result is the result of a query execution.
Directories ¶
Path | Synopsis |
---|---|
Package metadata provides primitives for recording metadata across the query path.
|
Package metadata provides primitives for recording metadata across the query path. |
Package stats provides primitives for recording metrics across the query path.
|
Package stats provides primitives for recording metrics across the query path. |
Click to show internal directories.
Click to hide internal directories.