dashboard

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStatTextSize       = 12
	DefaultStatValueSize      = 20
	DefaultAlertEvaluateEvery = "10s"
	DefaultAlertFor           = "10s"
	DefaultDashboardUUID      = "Wasp"

	DefaultRequirementLabelKey = "requirement_name"
)
View Source
const (
	AlertTypeQuantile99 = "quantile_99"
	AlertTypeErrors     = "errors"
	AlertTypeTimeouts   = "timeouts"
)

Variables

This section is empty.

Functions

func AddVariables

func AddVariables(datasourceName string) []dashboard.Option

func InlineLokiAlertParams

func InlineLokiAlertParams(queryType, testName, genName string) string

InlineLokiAlertParams is specific params for predefined alerts for wasp dashboard

func RPSPanel

func RPSPanel(dataSource string, query map[string]string) row.Option

func RPSVUPerScheduleSegmentsPanel

func RPSVUPerScheduleSegmentsPanel(dataSource string, query map[string]string) row.Option

func WASPDebugDataRow

func WASPDebugDataRow(dataSource string, query map[string]string, collapse bool) dashboard.Option

func WASPLoadStatsRow

func WASPLoadStatsRow(dataSource string, query map[string]string) dashboard.Option

Types

type Dashboard

type Dashboard struct {
	Name           string
	DataSourceName string
	Folder         string
	GrafanaURL     string
	GrafanaToken   string
	// contains filtered or unexported fields
}

Dashboard is a Wasp dashboard

func NewDashboard

func NewDashboard(reqs []WaspAlert, opts []dashboard.Option) (*Dashboard, error)

NewDashboard creates new dashboard

func (*Dashboard) Build

func (m *Dashboard) Build(dashboardName, datasourceName string, requirements []WaspAlert) error

Build creates dashboard instance

func (*Dashboard) Deploy

func (m *Dashboard) Deploy() (*grabana.Dashboard, error)

Deploy deploys this dashboard to some Grafana folder

func (*Dashboard) JSON

func (m *Dashboard) JSON() ([]byte, error)

JSON render dashboard as JSON

type WaspAlert

type WaspAlert struct {
	Name                 string
	AlertType            string
	TestName             string
	GenName              string
	RequirementGroupName string
	AlertIf              alert.ConditionEvaluator
	CustomAlert          timeseries.Option
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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