Documentation ¶
Index ¶
- type AggregateAttributeRequest
- type AggregateAttributeResponse
- type AggregateOperator
- type AttributeKey
- type AttributeKeyDataType
- type AttributeKeyType
- type BuilderQuery
- type ClickHouseQuery
- type CompositeQuery
- type DataSource
- type FilterAttributeKeyRequest
- type FilterAttributeKeyResponse
- type FilterAttributeValueRequest
- type FilterAttributeValueResponse
- type FilterItem
- type FilterOperator
- type FilterSet
- type Function
- type Having
- type LatencyMetricMetadataResponse
- type LogsLiveTailClient
- type OrderBy
- type PanelType
- type Point
- type PromQuery
- type QueryRangeParamsV3
- type QueryRangeResponse
- type QueryType
- type ReduceToOperator
- type Result
- type Row
- type SavedView
- type Series
- type SpaceAggregation
- type TagType
- type Temporality
- type TimeAggregation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateAttributeRequest ¶
type AggregateAttributeRequest struct { DataSource DataSource `json:"dataSource"` Operator AggregateOperator `json:"aggregateOperator"` SearchText string `json:"searchText"` Limit int `json:"limit"` }
AggregateAttributeRequest is a request to fetch possible attribute keys for a selected aggregate operator and search text. The context of the selected aggregate operator is used as the type of the attribute key is different for different aggregate operators. For example, for the aggregate operator "avg" the attribute value type must be a number
type AggregateAttributeResponse ¶
type AggregateAttributeResponse struct {
AttributeKeys []AttributeKey `json:"attributeKeys"`
}
type AggregateOperator ¶
type AggregateOperator string
const ( AggregateOperatorNoOp AggregateOperator = "noop" AggregateOperatorCount AggregateOperator = "count" AggregateOperatorCountDistinct AggregateOperator = "count_distinct" AggregateOperatorSum AggregateOperator = "sum" AggregateOperatorAvg AggregateOperator = "avg" AggregateOperatorMin AggregateOperator = "min" AggregateOperatorMax AggregateOperator = "max" AggregateOperatorP05 AggregateOperator = "p05" AggregateOperatorP10 AggregateOperator = "p10" AggregateOperatorP20 AggregateOperator = "p20" AggregateOperatorP25 AggregateOperator = "p25" AggregateOperatorP50 AggregateOperator = "p50" AggregateOperatorP75 AggregateOperator = "p75" AggregateOperatorP90 AggregateOperator = "p90" AggregateOperatorP95 AggregateOperator = "p95" AggregateOperatorP99 AggregateOperator = "p99" AggregateOperatorRate AggregateOperator = "rate" AggregateOperatorSumRate AggregateOperator = "sum_rate" AggregateOperatorAvgRate AggregateOperator = "avg_rate" AggregateOperatorMinRate AggregateOperator = "min_rate" AggregateOperatorMaxRate AggregateOperator = "max_rate" AggregateOperatorRateSum AggregateOperator = "rate_sum" AggregateOperatorRateAvg AggregateOperator = "rate_avg" AggregateOperatorRateMin AggregateOperator = "rate_min" AggregateOperatorRateMax AggregateOperator = "rate_max" AggregateOperatorHistQuant50 AggregateOperator = "hist_quantile_50" AggregateOperatorHistQuant75 AggregateOperator = "hist_quantile_75" AggregateOperatorHistQuant90 AggregateOperator = "hist_quantile_90" AggregateOperatorHistQuant95 AggregateOperator = "hist_quantile_95" AggregateOperatorHistQuant99 AggregateOperator = "hist_quantile_99" )
func (AggregateOperator) IsRateOperator ¶
func (a AggregateOperator) IsRateOperator() bool
func (AggregateOperator) RequireAttribute ¶
func (a AggregateOperator) RequireAttribute(dataSource DataSource) bool
RequireAttribute returns true if the aggregate operator requires an attribute to be specified.
func (AggregateOperator) Validate ¶
func (a AggregateOperator) Validate() error
type AttributeKey ¶
type AttributeKey struct { Key string `json:"key"` DataType AttributeKeyDataType `json:"dataType"` Type AttributeKeyType `json:"type"` IsColumn bool `json:"isColumn"` IsJSON bool `json:"isJSON"` }
func (AttributeKey) CacheKey ¶
func (a AttributeKey) CacheKey() string
func (AttributeKey) Validate ¶
func (a AttributeKey) Validate() error
type AttributeKeyDataType ¶
type AttributeKeyDataType string
const ( AttributeKeyDataTypeUnspecified AttributeKeyDataType = "" AttributeKeyDataTypeString AttributeKeyDataType = "string" AttributeKeyDataTypeInt64 AttributeKeyDataType = "int64" AttributeKeyDataTypeFloat64 AttributeKeyDataType = "float64" AttributeKeyDataTypeBool AttributeKeyDataType = "bool" AttributeKeyDataTypeArrayString AttributeKeyDataType = "array(string)" AttributeKeyDataTypeArrayInt64 AttributeKeyDataType = "array(int64)" AttributeKeyDataTypeArrayFloat64 AttributeKeyDataType = "array(float64)" AttributeKeyDataTypeArrayBool AttributeKeyDataType = "array(bool)" )
func (AttributeKeyDataType) Validate ¶
func (q AttributeKeyDataType) Validate() error
type AttributeKeyType ¶
type AttributeKeyType string
const ( AttributeKeyTypeUnspecified AttributeKeyType = "" AttributeKeyTypeTag AttributeKeyType = "tag" AttributeKeyTypeResource AttributeKeyType = "resource" )
type BuilderQuery ¶
type BuilderQuery struct { QueryName string `json:"queryName"` StepInterval int64 `json:"stepInterval"` DataSource DataSource `json:"dataSource"` AggregateOperator AggregateOperator `json:"aggregateOperator"` AggregateAttribute AttributeKey `json:"aggregateAttribute,omitempty"` Temporality Temporality `json:"temporality,omitempty"` Filters *FilterSet `json:"filters,omitempty"` GroupBy []AttributeKey `json:"groupBy,omitempty"` Expression string `json:"expression"` Disabled bool `json:"disabled"` Having []Having `json:"having,omitempty"` Legend string `json:"legend,omitempty"` Limit uint64 `json:"limit"` Offset uint64 `json:"offset"` PageSize uint64 `json:"pageSize"` OrderBy []OrderBy `json:"orderBy,omitempty"` ReduceTo ReduceToOperator `json:"reduceTo,omitempty"` SelectColumns []AttributeKey `json:"selectColumns,omitempty"` TimeAggregation TimeAggregation `json:"timeAggregation,omitempty"` SpaceAggregation SpaceAggregation `json:"spaceAggregation,omitempty"` Functions []Function `json:"functions,omitempty"` }
func (*BuilderQuery) Validate ¶
func (b *BuilderQuery) Validate() error
type ClickHouseQuery ¶
type ClickHouseQuery struct { Query string `json:"query"` Disabled bool `json:"disabled"` Legend string `json:"legend,omitempty"` }
func (*ClickHouseQuery) Validate ¶
func (c *ClickHouseQuery) Validate() error
type CompositeQuery ¶
type CompositeQuery struct { BuilderQueries map[string]*BuilderQuery `json:"builderQueries,omitempty"` ClickHouseQueries map[string]*ClickHouseQuery `json:"chQueries,omitempty"` PromQueries map[string]*PromQuery `json:"promQueries,omitempty"` PanelType PanelType `json:"panelType"` QueryType QueryType `json:"queryType"` Unit string `json:"unit,omitempty"` }
func (*CompositeQuery) Validate ¶
func (c *CompositeQuery) Validate() error
type DataSource ¶
type DataSource string
const ( DataSourceTraces DataSource = "traces" DataSourceLogs DataSource = "logs" DataSourceMetrics DataSource = "metrics" )
func (DataSource) Validate ¶
func (d DataSource) Validate() error
type FilterAttributeKeyRequest ¶
type FilterAttributeKeyRequest struct { DataSource DataSource `json:"dataSource"` AggregateOperator AggregateOperator `json:"aggregateOperator"` AggregateAttribute string `json:"aggregateAttribute"` SearchText string `json:"searchText"` Limit int `json:"limit"` }
FilterAttributeKeyRequest is a request to fetch possible attribute keys for a selected aggregate operator and aggregate attribute and search text.
type FilterAttributeKeyResponse ¶
type FilterAttributeKeyResponse struct {
AttributeKeys []AttributeKey `json:"attributeKeys"`
}
type FilterAttributeValueRequest ¶
type FilterAttributeValueRequest struct { DataSource DataSource `json:"dataSource"` AggregateOperator AggregateOperator `json:"aggregateOperator"` AggregateAttribute string `json:"aggregateAttribute"` FilterAttributeKey string `json:"filterAttributeKey"` FilterAttributeKeyDataType AttributeKeyDataType `json:"filterAttributeKeyDataType"` TagType TagType `json:"tagType"` SearchText string `json:"searchText"` Limit int `json:"limit"` }
FilterAttributeValueRequest is a request to fetch possible attribute values for a selected aggregate operator, aggregate attribute, filter attribute key and search text.
type FilterItem ¶
type FilterItem struct { Key AttributeKey `json:"key"` Value interface{} `json:"value"` Operator FilterOperator `json:"op"` }
func (*FilterItem) CacheKey ¶
func (f *FilterItem) CacheKey() string
type FilterOperator ¶
type FilterOperator string
const ( FilterOperatorEqual FilterOperator = "=" FilterOperatorNotEqual FilterOperator = "!=" FilterOperatorGreaterThan FilterOperator = ">" FilterOperatorGreaterThanOrEq FilterOperator = ">=" FilterOperatorLessThan FilterOperator = "<" FilterOperatorLessThanOrEq FilterOperator = "<=" FilterOperatorIn FilterOperator = "in" FilterOperatorNotIn FilterOperator = "nin" FilterOperatorContains FilterOperator = "contains" FilterOperatorNotContains FilterOperator = "ncontains" FilterOperatorRegex FilterOperator = "regex" FilterOperatorNotRegex FilterOperator = "nregex" // (I)LIKE is faster than REGEX and supports index FilterOperatorLike FilterOperator = "like" FilterOperatorNotLike FilterOperator = "nlike" FilterOperatorExists FilterOperator = "exists" FilterOperatorNotExists FilterOperator = "nexists" FilterOperatorHas FilterOperator = "has" FilterOperatorNotHas FilterOperator = "nhas" )
type FilterSet ¶
type FilterSet struct { Operator string `json:"op,omitempty"` Items []FilterItem `json:"items"` }
type Having ¶
type LogsLiveTailClient ¶
type OrderBy ¶
type OrderBy struct { ColumnName string `json:"columnName"` Order string `json:"order"` Key string `json:"-"` DataType AttributeKeyDataType `json:"-"` Type AttributeKeyType `json:"-"` IsColumn bool `json:"-"` }
type Point ¶
func (*Point) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Point) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type PromQuery ¶
type QueryRangeParamsV3 ¶
type QueryRangeParamsV3 struct { Start int64 `json:"start"` End int64 `json:"end"` Step int64 `json:"step"` // step is in seconds; used for prometheus queries CompositeQuery *CompositeQuery `json:"compositeQuery"` Variables map[string]interface{} `json:"variables,omitempty"` NoCache bool `json:"noCache"` }
type QueryRangeResponse ¶
type ReduceToOperator ¶
type ReduceToOperator string
const ( ReduceToOperatorLast ReduceToOperator = "last" ReduceToOperatorSum ReduceToOperator = "sum" ReduceToOperatorAvg ReduceToOperator = "avg" ReduceToOperatorMin ReduceToOperator = "min" ReduceToOperatorMax ReduceToOperator = "max" )
func (ReduceToOperator) Validate ¶
func (r ReduceToOperator) Validate() error
type SavedView ¶
type SavedView struct { UUID string `json:"uuid,omitempty"` Name string `json:"name"` Category string `json:"category"` CreatedAt time.Time `json:"createdAt"` CreatedBy string `json:"createdBy"` UpdatedAt time.Time `json:"updatedAt"` UpdatedBy string `json:"updatedBy"` SourcePage string `json:"sourcePage"` Tags []string `json:"tags"` CompositeQuery *CompositeQuery `json:"compositeQuery"` // ExtraData is JSON encoded data used by frontend to store additional data ExtraData string `json:"extraData"` }
SavedView is a saved query for the explore page It is a composite query with a source page name and user defined tags The source page name is used to identify the page that initiated the query The source page could be "traces", "logs", "metrics".
type Series ¶
type Series struct { Labels map[string]string `json:"labels"` LabelsArray []map[string]string `json:"labelsArray"` Points []Point `json:"values"` GroupingSetsPoint *Point `json:"-"` }
func (*Series) SortPoints ¶
func (s *Series) SortPoints()
type SpaceAggregation ¶
type SpaceAggregation string
const ( SpaceAggregationUnspecified SpaceAggregation = "" SpaceAggregationSum SpaceAggregation = "sum" SpaceAggregationAvg SpaceAggregation = "avg" SpaceAggregationMin SpaceAggregation = "min" SpaceAggregationMax SpaceAggregation = "max" SpaceAggregationCount SpaceAggregation = "count" )
type Temporality ¶
type Temporality string
const ( Unspecified Temporality = "Unspecified" Delta Temporality = "Delta" Cumulative Temporality = "Cumulative" )
type TimeAggregation ¶
type TimeAggregation string
const ( TimeAggregationUnspecified TimeAggregation = "" TimeAggregationAnyLast TimeAggregation = "latest" TimeAggregationSum TimeAggregation = "sum" TimeAggregationAvg TimeAggregation = "avg" TimeAggregationMin TimeAggregation = "min" TimeAggregationMax TimeAggregation = "max" TimeAggregationCount TimeAggregation = "count" TimeAggregationCountDistinct TimeAggregation = "count_distinct" TimeAggregationRate TimeAggregation = "rate" TimeAggregationIncrease TimeAggregation = "increase" )