constructor

package
v1.17.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QUERIES = []Query{}/* 238 elements not displayed */
View Source
var RecordingRules = map[string]func(db *db.DB, p *db.Project, w *model.World) []*model.MetricValues{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type Cache added in v1.5.0

type Cache interface {
	QueryRange(ctx context.Context, query string, from, to timeseries.Time, step timeseries.Duration, fillFunc timeseries.FillFunc) ([]*model.MetricValues, error)
	GetStep(from, to timeseries.Time) (timeseries.Duration, error)
}

type CardinalityStats added in v1.8.12

type CardinalityStats struct {
	ContainerId       int               `json:"container_id"`
	Destination       *DestinationStats `json:"destination,omitempty"`
	ActualDestination *DestinationStats `json:"actual_destination,omitempty"`
}

type Constructor

type Constructor struct {
	// contains filtered or unexported fields
}

func New

func New(db DB, project *db.Project, cacheClients map[db.ProjectId]Cache, pricing *pricing.Manager, options ...Option) *Constructor

func (*Constructor) LoadWorld

func (c *Constructor) LoadWorld(ctx context.Context, from, to timeseries.Time, step timeseries.Duration, prof *Profile) (*model.World, error)

func (*Constructor) QueryCache added in v1.14.0

func (c *Constructor) QueryCache(ctx context.Context, cache Cache, project *db.Project, from, to timeseries.Time, step timeseries.Duration) (map[string][]*model.MetricValues, error)

type DB added in v1.14.0

type DB interface {
	GetCheckConfigs(projectId db.ProjectId) (model.CheckConfigs, error)
	GetApplicationDeployments(projectId db.ProjectId) (map[model.ApplicationId][]*model.ApplicationDeployment, error)
	GetApplicationIncidents(projectId db.ProjectId, from, to timeseries.Time) (map[model.ApplicationId][]*model.ApplicationIncident, error)
	GetApplicationSettingsByProject(projectId db.ProjectId) (map[model.ApplicationId]*model.ApplicationSettings, error)
	GetProjects() (map[string]*db.Project, error)
}

type DestinationStats added in v1.8.12

type DestinationStats struct {
	Unique         int `json:"unique"`
	ExternalTotal  int `json:"external_total"`
	ExternalUnique int `json:"external_unique"`
	PrivateTotal   int `json:"private_total"`
	PrivateUnique  int `json:"private_unique"`
	FqdnTotal      int `json:"fqdn_total"`
	FqdnUnique     int `json:"fqdn_unique"`
	LoopbackTotal  int `json:"loopback_total"`
	// contains filtered or unexported fields
}

func NewDestinationStats added in v1.8.12

func NewDestinationStats() *DestinationStats

type Option

type Option int
const (
	OptionLoadInstanceToInstanceConnections Option = iota
	OptionDoNotLoadRawSLIs
	OptionLoadContainerLogs
)

type Profile

type Profile struct {
	Stages  map[string]float32    `json:"stages"`
	Queries map[string]QueryStats `json:"queries"`
}

type Query added in v1.8.7

type Query struct {
	Name   string
	Query  string
	Labels *utils.StringSet

	InstanceToInstance bool
}

func Q added in v1.8.7

func Q(name, query string, labels ...string) Query

type QueryStats

type QueryStats struct {
	MetricsCount int               `json:"metrics_count"`
	QueryTime    float32           `json:"query_time"`
	Failed       bool              `json:"failed"`
	Cardinality  *CardinalityStats `json:"cardinality,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL