insights

package
v0.312.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnomaliesCmd

func AnomaliesCmd(ch *cmdutil.Helper) *cobra.Command

AnomaliesCmd lists detected resource anomalies for a branch.

func ErrorsCmd

func ErrorsCmd(ch *cmdutil.Helper) *cobra.Command

ErrorsCmd lists aggregated query errors for a branch.

func InsightsCmd

func InsightsCmd(ch *cmdutil.Helper) *cobra.Command

InsightsCmd surfaces server-side query insights for a database: aggregated query statistics, query errors, anomalies, and schema recommendations.

func QueriesCmd

func QueriesCmd(ch *cmdutil.Helper) *cobra.Command

QueriesCmd lists aggregated query statistics for a branch.

func RecommendationsCmd

func RecommendationsCmd(ch *cmdutil.Helper) *cobra.Command

RecommendationsCmd lists schema recommendations for a database.

Types

type AnomalyRow

type AnomalyRow struct {
	ID                 string `header:"id" json:"id"`
	Active             bool   `header:"active" json:"active"`
	PeriodStart        string `header:"started" json:"period_start"`
	PeriodEnd          string `header:"ended" json:"period_end"`
	MinutesInViolation int64  `header:"minutes in violation" json:"minutes_in_violation"`
}

AnomalyRow is an anomaly formatted for table output.

type ErrorRow

type ErrorRow struct {
	Count    int64  `header:"count" json:"error_count"`
	LastSeen string `header:"last seen" json:"started_at"`
	Message  string `header:"message" json:"error_message"`
	ID       string `header:"id" json:"id"`
}

ErrorRow is a query error row formatted for table output.

type QueryRow

type QueryRow struct {
	Count         int64   `header:"count" json:"query_count"`
	TotalTimeMs   float64 `header:"total time (ms)" json:"sum_total_duration_millis"`
	TimePerQryMs  float64 `header:"per query (ms)" json:"time_per_query"`
	P50Ms         float64 `header:"p50 (ms)" json:"p50_latency"`
	P99Ms         float64 `header:"p99 (ms)" json:"p99_latency"`
	RowsRead      int64   `header:"rows read" json:"sum_rows_read"`
	ReadPerReturn float64 `header:"read/returned" json:"rows_read_per_returned"`
	Errors        int64   `header:"errors" json:"error_count"`
	LastRunAt     string  `header:"last run" json:"last_run_at"`
	Query         string  `header:"query" json:"normalized_sql"`
}

QueryRow is a query statistics row formatted for table output.

type RecommendationRow

type RecommendationRow struct {
	Number   int    `header:"number" json:"number"`
	State    string `header:"state" json:"state"`
	Type     string `header:"type" json:"recommendation_type"`
	Table    string `header:"table" json:"table_name"`
	Keyspace string `header:"keyspace" json:"keyspace,omitempty"`
	Title    string `header:"title" json:"title"`
}

RecommendationRow is a schema recommendation formatted for table output.

Jump to

Keyboard shortcuts

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