Documentation
¶
Index ¶
- func AnomaliesCmd(ch *cmdutil.Helper) *cobra.Command
- func ErrorsCmd(ch *cmdutil.Helper) *cobra.Command
- func InsightsCmd(ch *cmdutil.Helper) *cobra.Command
- func QueriesCmd(ch *cmdutil.Helper) *cobra.Command
- func QuerySamplesCmd(ch *cmdutil.Helper) *cobra.Command
- func RecommendationDismissCmd(ch *cmdutil.Helper) *cobra.Command
- func RecommendationsCmd(ch *cmdutil.Helper) *cobra.Command
- func TagShowCmd(ch *cmdutil.Helper) *cobra.Command
- func TagSummariesCmd(ch *cmdutil.Helper) *cobra.Command
- func TagsCmd(ch *cmdutil.Helper) *cobra.Command
- type AnomalyRow
- type ErrorRow
- type QueryRow
- type QuerySampleRow
- type RecommendationRow
- type TagRow
- type TagSummaryRow
- type TagValueRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnomaliesCmd ¶
AnomaliesCmd lists detected resource anomalies for a branch.
func InsightsCmd ¶
InsightsCmd surfaces server-side query insights for a database: aggregated query statistics, query errors, anomalies, and schema recommendations.
func QueriesCmd ¶
QueriesCmd lists aggregated query statistics for a branch.
func QuerySamplesCmd ¶ added in v0.315.0
QuerySamplesCmd lists recent individual executions for a query fingerprint.
func RecommendationDismissCmd ¶ added in v0.315.0
RecommendationDismissCmd dismisses a schema recommendation.
func RecommendationsCmd ¶
RecommendationsCmd lists schema recommendations for a database.
func TagShowCmd ¶ added in v0.315.0
TagShowCmd shows one tag key and its values.
func TagSummariesCmd ¶ added in v0.315.0
TagSummariesCmd lists query statistics grouped by tag keys.
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 {
Fingerprint string `header:"fingerprint" json:"fingerprint"`
Keyspace string `header:"keyspace" json:"keyspace"`
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 QuerySampleRow ¶ added in v0.315.0
type QuerySampleRow struct {
ID string `header:"id" json:"id"`
StartedAt string `header:"started" json:"started_at"`
DurationMs float64 `header:"duration (ms)" json:"total_duration_millis"`
Username string `header:"user" json:"username"`
RowsRead int64 `header:"rows read" json:"rows_read"`
RowsReturned int64 `header:"rows returned" json:"rows_returned"`
Error string `header:"error" json:"error_message"`
Query string `header:"query" json:"normalized_sql"`
}
QuerySampleRow is an individual query execution 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.
type TagRow ¶ added in v0.315.0
type TagRow struct {
Name string `header:"name" json:"name"`
Source string `header:"source" json:"source"`
QueryCount int64 `header:"queries" json:"query_count"`
TopValues string `header:"top values" json:"top_values"`
}
TagRow is a tag key for table output.
type TagSummaryRow ¶ added in v0.315.0
type TagSummaryRow struct {
Dimensions string `header:"dimensions" json:"dimensions"`
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"`
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"`
}
TagSummaryRow is a tag-grouped query stats row for table output.
type TagValueRow ¶ added in v0.315.0
type TagValueRow struct {
Name string `header:"value" json:"name"`
Kind string `header:"kind" json:"kind"`
QueryCount int64 `header:"queries" json:"query_count"`
}
TagValueRow is a tag value for table output.