Documentation ¶
Index ¶
- type AppDeleter
- type AppGetter
- type AppInfo
- type AppNameGetter
- type BadgerDB
- type BadgerDBWithCache
- type CacheLayer
- type Config
- type DeleteAppInput
- type DeleteInput
- type ExemplarsGetter
- type ExemplarsMerger
- type ExemplarsQuerier
- type GetAppsOutput
- type GetExemplarInput
- type GetExemplarOutput
- type GetInput
- type GetLabelKeysByQueryInput
- type GetLabelKeysByQueryOutput
- type GetLabelValuesByQueryInput
- type GetLabelValuesByQueryOutput
- type GetOutput
- type Getter
- type Heatmap
- type HeatmapColumn
- type HeatmapParams
- type HeatmapSketch
- type IngestionQueue
- type LabelValuesGetter
- type LabelsGetter
- type MergeExemplarsInput
- type MergeExemplarsOutput
- type MetricsExporter
- type Prefix
- type PutInput
- type Putter
- type QueryExemplarsInput
- type QueryExemplarsOutput
- type SampleObserver
- type Storage
- func (s *Storage) CacheStats() map[string]uint64
- func (s *Storage) Cleanup(ctx context.Context) error
- func (s *Storage) Close() error
- func (s *Storage) DebugExport(w http.ResponseWriter, r *http.Request)
- func (s *Storage) Delete(_ context.Context, di *DeleteInput) error
- func (s *Storage) DeleteApp(_ context.Context, appname string) error
- func (s *Storage) DictsInternals() (*badger.DB, *cache.Cache)
- func (s *Storage) DimensionsInternals() (*badger.DB, *cache.Cache)
- func (s *Storage) DiskUsage() map[string]bytesize.ByteSize
- func (s *Storage) ExemplarsInternals() (*badger.DB, func())
- func (s *Storage) Get(ctx context.Context, gi *GetInput) (*GetOutput, error)
- func (s *Storage) GetAppNames(ctx context.Context) []string
- func (s *Storage) GetApps(ctx context.Context) (GetAppsOutput, error)
- func (s *Storage) GetExemplar(ctx context.Context, gi GetExemplarInput) (out GetExemplarOutput, err error)
- func (s *Storage) GetKeys(_ context.Context, cb func(string) bool)
- func (s *Storage) GetKeysByQuery(_ context.Context, in GetLabelKeysByQueryInput) (GetLabelKeysByQueryOutput, error)
- func (s *Storage) GetValues(_ context.Context, key string, cb func(v string) bool)
- func (s *Storage) GetValuesByQuery(_ context.Context, in GetLabelValuesByQueryInput) (GetLabelValuesByQueryOutput, error)
- func (s *Storage) InstallID() string
- func (s *Storage) JWT() (string, error)
- func (s *Storage) LoadAnalytics(a interface{}) error
- func (s *Storage) MainInternals() (*badger.DB, *cache.Cache)
- func (s *Storage) MergeExemplars(ctx context.Context, mi MergeExemplarsInput) (out MergeExemplarsOutput, err error)
- func (s *Storage) Put(ctx context.Context, pi *PutInput) error
- func (*Storage) QueryExemplars(context.Context, QueryExemplarsInput) (QueryExemplarsOutput, error)
- func (s *Storage) SaveAnalytics(a interface{}) error
- func (s *Storage) SegmentsInternals() (*badger.DB, *cache.Cache)
- func (s *Storage) TreesInternals() (*badger.DB, *cache.Cache)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppDeleter ¶ added in v0.25.0
type AppGetter ¶ added in v0.25.0
type AppGetter interface {
GetApps(ctx context.Context) (GetAppsOutput, error)
}
type AppNameGetter ¶ added in v0.14.0
type BadgerDBWithCache ¶ added in v0.17.0
type CacheLayer ¶ added in v0.17.0
type Config ¶ added in v0.2.5
type Config struct { NewBadger func(name string, p Prefix, codec cache.Codec) (BadgerDBWithCache, error) // contains filtered or unexported fields }
func (*Config) WithInMemory ¶ added in v0.3.0
WithInMemory makes the storage in-memory.
type DeleteAppInput ¶ added in v0.25.0
type DeleteAppInput struct {
Name string
}
type DeleteInput ¶ added in v0.0.33
type ExemplarsGetter ¶ added in v0.22.1
type ExemplarsGetter interface {
GetExemplar(context.Context, GetExemplarInput) (GetExemplarOutput, error)
}
type ExemplarsMerger ¶ added in v0.22.1
type ExemplarsMerger interface {
MergeExemplars(context.Context, MergeExemplarsInput) (MergeExemplarsOutput, error)
}
type ExemplarsQuerier ¶ added in v0.28.0
type ExemplarsQuerier interface {
QueryExemplars(context.Context, QueryExemplarsInput) (QueryExemplarsOutput, error)
}
type GetAppsOutput ¶ added in v0.25.0
type GetAppsOutput struct {
Apps []AppInfo
}
type GetExemplarInput ¶ added in v0.22.1
type GetExemplarOutput ¶ added in v0.22.1
type GetLabelKeysByQueryInput ¶ added in v0.17.0
type GetLabelKeysByQueryOutput ¶ added in v0.17.0
type GetLabelKeysByQueryOutput struct {
Keys []string
}
type GetLabelValuesByQueryInput ¶ added in v0.17.0
type GetLabelValuesByQueryOutput ¶ added in v0.17.0
type GetLabelValuesByQueryOutput struct {
Values []string
}
type Heatmap ¶ added in v0.28.0
type Heatmap struct { // Values matrix contain values that indicate count of value occurrences, // satisfying boundaries of the X and Y bins: [StartTime:EndTime) and (MinValue:MaxValue]. // A value can be accessed via Values[x][y], where: // 0 <= x < TimeBuckets, and // 0 <= y < ValueBuckets. Values [][]uint64 // TimeBuckets denotes number of ticks on the X-axis. TimeBuckets int64 // ValueBuckets denotes number of ticks on the Y-axis. ValueBuckets int64 // StartTime and EndTime indicate boundaries of the X axis. StartTime time.Time EndTime time.Time // MinValue and MaxValue indicate boundaries of the Y axis. MinValue uint64 MaxValue uint64 // MinDepth and MaxDepth indicate boundaries of the Z axis: [MinDepth:MaxDepth]. // MinDepth is the minimal non-zero value (count of value occurrences) that can // be found in Values. MinDepth uint64 MaxDepth uint64 }
type HeatmapColumn ¶ added in v0.28.0
type HeatmapParams ¶ added in v0.28.0
type HeatmapSketch ¶ added in v0.28.0
type HeatmapSketch struct { HeatmapParams Columns []HeatmapColumn }
type IngestionQueue ¶ added in v0.17.0
type IngestionQueue struct {
// contains filtered or unexported fields
}
func NewIngestionQueue ¶ added in v0.17.0
func NewIngestionQueue(logger logrus.FieldLogger, putter Putter, r prometheus.Registerer, c *Config) *IngestionQueue
func (*IngestionQueue) Put ¶ added in v0.17.0
func (s *IngestionQueue) Put(ctx context.Context, input *PutInput) error
func (*IngestionQueue) Stop ¶ added in v0.17.0
func (s *IngestionQueue) Stop()
type LabelValuesGetter ¶ added in v0.14.0
type LabelValuesGetter interface { GetValues(ctx context.Context, key string, cb func(v string) bool) GetValuesByQuery(ctx context.Context, in GetLabelValuesByQueryInput) (GetLabelValuesByQueryOutput, error) }
type LabelsGetter ¶ added in v0.14.0
type LabelsGetter interface { GetKeys(ctx context.Context, cb func(string) bool) GetKeysByQuery(ctx context.Context, in GetLabelKeysByQueryInput) (GetLabelKeysByQueryOutput, error) }
type MergeExemplarsInput ¶ added in v0.22.1
type MergeExemplarsOutput ¶ added in v0.22.1
type MetricsExporter ¶ added in v0.2.1
type MetricsExporter interface { // Evaluate evaluates metrics export rules against the input key and creates // prometheus counters for new time series, if required. Returned observer can // be used to evaluate and observe particular samples. // // If there are no matching rules, the function returns false. Evaluate(*PutInput) (SampleObserver, bool) }
MetricsExporter exports values of particular stack traces sample from profiling data as a Prometheus metrics.
type QueryExemplarsInput ¶ added in v0.28.0
type QueryExemplarsOutput ¶ added in v0.28.0
type SampleObserver ¶ added in v0.2.1
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func New ¶
func New(c *Config, logger *logrus.Logger, reg prometheus.Registerer, hc *health.Controller) (*Storage, error)
func (*Storage) CacheStats ¶ added in v0.0.33
func (*Storage) DebugExport ¶ added in v0.8.0
func (s *Storage) DebugExport(w http.ResponseWriter, r *http.Request)
func (*Storage) Delete ¶ added in v0.0.33
func (s *Storage) Delete(_ context.Context, di *DeleteInput) error
func (*Storage) DeleteApp ¶ added in v0.3.1
DeleteApp fully deletes an app It does so by deleting Segments, Dictionaries, Trees, Dimensions and Labels It's an idempotent call, ie. if the app already does not exist, no error is triggered. TODO cancelation?
func (*Storage) DictsInternals ¶ added in v0.16.0
func (*Storage) DimensionsInternals ¶ added in v0.16.0
func (*Storage) ExemplarsInternals ¶ added in v0.20.0
func (s *Storage) ExemplarsInternals() (*badger.DB, func())
func (*Storage) GetAppNames ¶ added in v0.3.0
GetAppNames returns the list of all app's names
func (*Storage) GetApps ¶ added in v0.25.0
func (s *Storage) GetApps(ctx context.Context) (GetAppsOutput, error)
func (*Storage) GetExemplar ¶ added in v0.22.1
func (s *Storage) GetExemplar(ctx context.Context, gi GetExemplarInput) (out GetExemplarOutput, err error)
func (*Storage) GetKeysByQuery ¶ added in v0.0.38
func (s *Storage) GetKeysByQuery(_ context.Context, in GetLabelKeysByQueryInput) (GetLabelKeysByQueryOutput, error)
func (*Storage) GetValuesByQuery ¶ added in v0.0.38
func (s *Storage) GetValuesByQuery(_ context.Context, in GetLabelValuesByQueryInput) (GetLabelValuesByQueryOutput, error)
func (*Storage) LoadAnalytics ¶ added in v0.8.0
func (*Storage) MainInternals ¶ added in v0.16.0
func (*Storage) MergeExemplars ¶ added in v0.22.1
func (s *Storage) MergeExemplars(ctx context.Context, mi MergeExemplarsInput) (out MergeExemplarsOutput, err error)
func (*Storage) QueryExemplars ¶ added in v0.28.0
func (*Storage) QueryExemplars(context.Context, QueryExemplarsInput) (QueryExemplarsOutput, error)
func (*Storage) SaveAnalytics ¶ added in v0.8.0
func (*Storage) SegmentsInternals ¶ added in v0.16.0
func (*Storage) TreesInternals ¶ added in v0.16.0
Source Files ¶
- analytics.go
- cleanup.go
- codec.go
- config.go
- db.go
- debug.go
- installid.go
- jwt.go
- mem_linux.go
- metrics.go
- migration.go
- queue.go
- retention.go
- storage.go
- storage_delete.go
- storage_exemplars.go
- storage_exemplars_get.go
- storage_exemplars_merge.go
- storage_exemplars_query.go
- storage_get.go
- storage_heatmap.go
- storage_labels.go
- storage_put.go
- types.go
Click to show internal directories.
Click to hide internal directories.