Documentation ¶
Index ¶
- Constants
- func AddVariables(datasourceName string) []dashboard.Option
- func InlineLokiAlertParams(queryType, testName, genName string) string
- func RPSPanel(dataSource string, query map[string]string) row.Option
- func RPSVUPerScheduleSegmentsPanel(dataSource string, query map[string]string) row.Option
- func WASPDebugDataRow(dataSource string, query map[string]string, collapse bool) dashboard.Option
- func WASPLoadStatsRow(dataSource string, query map[string]string) dashboard.Option
- type Dashboard
- type WaspAlert
Constants ¶
const ( DefaultStatTextSize = 12 DefaultStatValueSize = 20 DefaultAlertEvaluateEvery = "10s" DefaultAlertFor = "10s" DefaultDashboardUUID = "Wasp" DefaultRequirementLabelKey = "requirement_name" )
const ( AlertTypeQuantile99 = "quantile_99" AlertTypeErrors = "errors" AlertTypeTimeouts = "timeouts" )
Variables ¶
This section is empty.
Functions ¶
func AddVariables ¶
AddVariables generates standard dashboard options for common label variables using the provided datasourceName. It includes variables like go_test_name, gen_name, branch, commit, and call_group. Use this to easily incorporate these variables into your dashboard configuration.
func InlineLokiAlertParams ¶
InlineLokiAlertParams generates a Loki query string based on the alert type, test name, and generator name. It is used to configure specific alert conditions for monitoring test metrics in dashboards.
func RPSPanel ¶
RPSPanel creates a time series panel displaying responses per second grouped by generator and call group. It is used to monitor response rates in the dashboard.
func RPSVUPerScheduleSegmentsPanel ¶
RPSVUPerScheduleSegmentsPanel creates a dashboard panel displaying Requests Per Second and Virtual Users segmented by schedule. It is used to monitor performance metrics over time for different test configurations.
func WASPDebugDataRow ¶
WASPDebugDataRow returns a dashboard.Option containing a row with WASP debug metrics and logs. It uses the provided data source and query parameters. Use this function to include detailed debug information in your dashboard.
func WASPLoadStatsRow ¶
WASPLoadStatsRow creates a "WASP Load Stats" dashboard row with widgets displaying real-time and total load metrics. It utilizes the provided data source and query parameters to configure the relevant statistics for monitoring.
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 ¶
NewDashboard initializes a Dashboard with provided alerts and options, using environment variables for configuration. It prepares the dashboard for deployment and returns the instance or an error if setup fails.
func (*Dashboard) Build ¶
Build initializes the Dashboard with the specified name, data source, and alert requirements. It prepares the dashboard builder for further configuration and usage.