Documentation ¶
Index ¶
- Variables
- func IsEnabled(ctx context.Context) bool
- func ShouldTrackHTTPGRPCResponse(r *httpgrpc.HTTPResponse) bool
- type QueryStats
- func (s *QueryStats) AddExtraFields(fieldsVals ...interface{})
- func (s *QueryStats) AddFetchedChunkBytes(bytes uint64)
- func (s *QueryStats) AddFetchedChunks(count uint64)
- func (s *QueryStats) AddFetchedDataBytes(bytes uint64)
- func (s *QueryStats) AddFetchedSamples(count uint64)
- func (s *QueryStats) AddFetchedSeries(series uint64)
- func (s *QueryStats) AddQueryStorageWallTime(t time.Duration)
- func (s *QueryStats) AddSplitQueries(count uint64)
- func (s *QueryStats) AddStoreGatewayTouchedPostingBytes(bytes uint64)
- func (s *QueryStats) AddStoreGatewayTouchedPostings(count uint64)
- func (s *QueryStats) AddWallTime(t time.Duration)
- func (s *QueryStats) LoadDataSelectMaxTime() int64
- func (s *QueryStats) LoadDataSelectMinTime() int64
- func (s *QueryStats) LoadExtraFields() []interface{}
- func (s *QueryStats) LoadFetchedChunkBytes() uint64
- func (s *QueryStats) LoadFetchedChunks() uint64
- func (s *QueryStats) LoadFetchedDataBytes() uint64
- func (s *QueryStats) LoadFetchedSamples() uint64
- func (s *QueryStats) LoadFetchedSeries() uint64
- func (s *QueryStats) LoadPriority() (int64, bool)
- func (s *QueryStats) LoadQueryStorageWallTime() time.Duration
- func (s *QueryStats) LoadSplitQueries() uint64
- func (s *QueryStats) LoadStoreGatewayTouchedPostingBytes() uint64
- func (s *QueryStats) LoadStoreGatewayTouchedPostings() uint64
- func (s *QueryStats) LoadWallTime() time.Duration
- func (s *QueryStats) Merge(other *QueryStats)
- func (s *QueryStats) SetDataSelectMaxTime(dataSelectMaxTime int64)
- func (s *QueryStats) SetDataSelectMinTime(dataSelectMinTime int64)
- func (s *QueryStats) SetPriority(priority int64)
- type Stats
- func (*Stats) Descriptor() ([]byte, []int)
- func (this *Stats) Equal(that interface{}) bool
- func (m *Stats) GetExtraFields() map[string]string
- func (m *Stats) GetFetchedChunkBytes() uint64
- func (m *Stats) GetFetchedChunksCount() uint64
- func (m *Stats) GetFetchedDataBytes() uint64
- func (m *Stats) GetFetchedSamplesCount() uint64
- func (m *Stats) GetFetchedSeriesCount() uint64
- func (m *Stats) GetLimitHit() string
- func (m *Stats) GetQueryStorageWallTime() time.Duration
- func (m *Stats) GetSplitQueries() uint64
- func (m *Stats) GetStoreGatewayTouchedPostingBytes() uint64
- func (m *Stats) GetStoreGatewayTouchedPostingsCount() uint64
- func (m *Stats) GetWallTime() time.Duration
- func (this *Stats) GoString() string
- func (m *Stats) Marshal() (dAtA []byte, err error)
- func (m *Stats) MarshalTo(dAtA []byte) (int, error)
- func (m *Stats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Stats) ProtoMessage()
- func (m *Stats) Reset()
- func (m *Stats) Size() (n int)
- func (this *Stats) String() string
- func (m *Stats) Unmarshal(dAtA []byte) error
- func (m *Stats) XXX_DiscardUnknown()
- func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stats) XXX_Merge(src proto.Message)
- func (m *Stats) XXX_Size() int
- func (m *Stats) XXX_Unmarshal(b []byte) error
- type WallTimeMiddleware
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStats = fmt.Errorf("proto: integer overflow") )
Functions ¶
func IsEnabled ¶ added in v1.7.0
IsEnabled returns whether stats tracking is enabled in the context.
func ShouldTrackHTTPGRPCResponse ¶
func ShouldTrackHTTPGRPCResponse(r *httpgrpc.HTTPResponse) bool
Types ¶
type QueryStats ¶ added in v1.15.0
type QueryStats struct { Stats PriorityAssigned bool Priority int64 DataSelectMaxTime int64 DataSelectMinTime int64 // contains filtered or unexported fields }
func ContextWithEmptyStats ¶
func ContextWithEmptyStats(ctx context.Context) (*QueryStats, context.Context)
ContextWithEmptyStats returns a context with empty stats.
func FromContext ¶
func FromContext(ctx context.Context) *QueryStats
FromContext gets the Stats out of the Context. Returns nil if stats have not been initialised in the context.
func (*QueryStats) AddExtraFields ¶ added in v1.15.0
func (s *QueryStats) AddExtraFields(fieldsVals ...interface{})
func (*QueryStats) AddFetchedChunkBytes ¶ added in v1.15.0
func (s *QueryStats) AddFetchedChunkBytes(bytes uint64)
func (*QueryStats) AddFetchedChunks ¶ added in v1.15.0
func (s *QueryStats) AddFetchedChunks(count uint64)
func (*QueryStats) AddFetchedDataBytes ¶ added in v1.15.0
func (s *QueryStats) AddFetchedDataBytes(bytes uint64)
func (*QueryStats) AddFetchedSamples ¶ added in v1.15.0
func (s *QueryStats) AddFetchedSamples(count uint64)
func (*QueryStats) AddFetchedSeries ¶ added in v1.15.0
func (s *QueryStats) AddFetchedSeries(series uint64)
func (*QueryStats) AddQueryStorageWallTime ¶ added in v1.17.0
func (s *QueryStats) AddQueryStorageWallTime(t time.Duration)
AddQueryStorageWallTime adds some time to the counter.
func (*QueryStats) AddSplitQueries ¶ added in v1.17.0
func (s *QueryStats) AddSplitQueries(count uint64)
func (*QueryStats) AddStoreGatewayTouchedPostingBytes ¶ added in v1.18.0
func (s *QueryStats) AddStoreGatewayTouchedPostingBytes(bytes uint64)
func (*QueryStats) AddStoreGatewayTouchedPostings ¶ added in v1.18.0
func (s *QueryStats) AddStoreGatewayTouchedPostings(count uint64)
func (*QueryStats) AddWallTime ¶ added in v1.15.0
func (s *QueryStats) AddWallTime(t time.Duration)
AddWallTime adds some time to the counter.
func (*QueryStats) LoadDataSelectMaxTime ¶ added in v1.17.0
func (s *QueryStats) LoadDataSelectMaxTime() int64
func (*QueryStats) LoadDataSelectMinTime ¶ added in v1.17.0
func (s *QueryStats) LoadDataSelectMinTime() int64
func (*QueryStats) LoadExtraFields ¶ added in v1.15.0
func (s *QueryStats) LoadExtraFields() []interface{}
func (*QueryStats) LoadFetchedChunkBytes ¶ added in v1.15.0
func (s *QueryStats) LoadFetchedChunkBytes() uint64
func (*QueryStats) LoadFetchedChunks ¶ added in v1.15.0
func (s *QueryStats) LoadFetchedChunks() uint64
func (*QueryStats) LoadFetchedDataBytes ¶ added in v1.15.0
func (s *QueryStats) LoadFetchedDataBytes() uint64
func (*QueryStats) LoadFetchedSamples ¶ added in v1.15.0
func (s *QueryStats) LoadFetchedSamples() uint64
func (*QueryStats) LoadFetchedSeries ¶ added in v1.15.0
func (s *QueryStats) LoadFetchedSeries() uint64
func (*QueryStats) LoadPriority ¶ added in v1.17.0
func (s *QueryStats) LoadPriority() (int64, bool)
func (*QueryStats) LoadQueryStorageWallTime ¶ added in v1.17.0
func (s *QueryStats) LoadQueryStorageWallTime() time.Duration
LoadQueryStorageWallTime returns current query storage wall time.
func (*QueryStats) LoadSplitQueries ¶ added in v1.17.0
func (s *QueryStats) LoadSplitQueries() uint64
func (*QueryStats) LoadStoreGatewayTouchedPostingBytes ¶ added in v1.18.0
func (s *QueryStats) LoadStoreGatewayTouchedPostingBytes() uint64
func (*QueryStats) LoadStoreGatewayTouchedPostings ¶ added in v1.18.0
func (s *QueryStats) LoadStoreGatewayTouchedPostings() uint64
func (*QueryStats) LoadWallTime ¶ added in v1.15.0
func (s *QueryStats) LoadWallTime() time.Duration
LoadWallTime returns current wall time.
func (*QueryStats) Merge ¶ added in v1.15.0
func (s *QueryStats) Merge(other *QueryStats)
Merge the provided Stats into this one.
func (*QueryStats) SetDataSelectMaxTime ¶ added in v1.17.0
func (s *QueryStats) SetDataSelectMaxTime(dataSelectMaxTime int64)
func (*QueryStats) SetDataSelectMinTime ¶ added in v1.17.0
func (s *QueryStats) SetDataSelectMinTime(dataSelectMinTime int64)
func (*QueryStats) SetPriority ¶ added in v1.17.0
func (s *QueryStats) SetPriority(priority int64)
type Stats ¶
type Stats struct { // The sum of all wall time spent in the querier to execute the query. WallTime time.Duration `protobuf:"bytes,1,opt,name=wall_time,json=wallTime,proto3,stdduration" json:"wall_time"` // The number of series fetched for the query FetchedSeriesCount uint64 `protobuf:"varint,2,opt,name=fetched_series_count,json=fetchedSeriesCount,proto3" json:"fetched_series_count,omitempty"` // The number of bytes of the chunks fetched for the query FetchedChunkBytes uint64 `protobuf:"varint,3,opt,name=fetched_chunk_bytes,json=fetchedChunkBytes,proto3" json:"fetched_chunk_bytes,omitempty"` // The number of bytes of data fetched for the query FetchedDataBytes uint64 `protobuf:"varint,4,opt,name=fetched_data_bytes,json=fetchedDataBytes,proto3" json:"fetched_data_bytes,omitempty"` // Extra fields to be reported on the stats log ExtraFields map[string]string `` /* 182-byte string literal not displayed */ // The number of chunks fetched for the query FetchedChunksCount uint64 `protobuf:"varint,6,opt,name=fetched_chunks_count,json=fetchedChunksCount,proto3" json:"fetched_chunks_count,omitempty"` // The number of samples fetched for the query FetchedSamplesCount uint64 `protobuf:"varint,7,opt,name=fetched_samples_count,json=fetchedSamplesCount,proto3" json:"fetched_samples_count,omitempty"` // The limit hit when executing the query LimitHit string `protobuf:"bytes,8,opt,name=limit_hit,json=limitHit,proto3" json:"limit_hit,omitempty"` // The total number of split queries sent after going through all the middlewares. // It includes the number of requests that might be discarded by the queue. SplitQueries uint64 `protobuf:"varint,9,opt,name=split_queries,json=splitQueries,proto3" json:"split_queries,omitempty"` // The sum of wall time spent in the querier to fetch and merge data from storage. QueryStorageWallTime time.Duration `` /* 128-byte string literal not displayed */ // The total number of postings touched in store gateway for a specific query. // Only successful requests from querier to store gateway are included. StoreGatewayTouchedPostingsCount uint64 `` /* 165-byte string literal not displayed */ // The total size of postings touched in store gateway for a specific query, in bytes. // Only successful requests from querier to store gateway are included. StoreGatewayTouchedPostingBytes uint64 `` /* 162-byte string literal not displayed */ }
func (*Stats) Descriptor ¶
func (*Stats) GetExtraFields ¶ added in v1.15.0
func (*Stats) GetFetchedChunkBytes ¶ added in v1.11.0
func (*Stats) GetFetchedChunksCount ¶ added in v1.15.0
func (*Stats) GetFetchedDataBytes ¶ added in v1.14.0
func (*Stats) GetFetchedSamplesCount ¶ added in v1.15.0
func (*Stats) GetFetchedSeriesCount ¶ added in v1.11.0
func (*Stats) GetLimitHit ¶ added in v1.16.0
func (*Stats) GetQueryStorageWallTime ¶ added in v1.17.0
func (*Stats) GetSplitQueries ¶ added in v1.17.0
func (*Stats) GetStoreGatewayTouchedPostingBytes ¶ added in v1.18.0
func (*Stats) GetStoreGatewayTouchedPostingsCount ¶ added in v1.18.0
func (*Stats) GetWallTime ¶
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
func (*Stats) XXX_DiscardUnknown ¶
func (m *Stats) XXX_DiscardUnknown()
func (*Stats) XXX_Marshal ¶
func (*Stats) XXX_Unmarshal ¶
type WallTimeMiddleware ¶
type WallTimeMiddleware struct{}
WallTimeMiddleware tracks the wall time.
func NewWallTimeMiddleware ¶
func NewWallTimeMiddleware() WallTimeMiddleware
NewWallTimeMiddleware makes a new WallTimeMiddleware.
Click to show internal directories.
Click to hide internal directories.