codeintel: add variable to service dashboards to filter by 'app' (#43865)

This commit is contained in:
Noah S-C 2022-11-03 15:54:37 +00:00 committed by GitHub
parent 1073e45e18
commit dc1ef37e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 235 additions and 188 deletions

View File

@ -7782,7 +7782,7 @@ an underprovisioned main postgres instance.
<details>
<summary>Technical details</summary>
Generated query for critical alert: `max((max(src_codeintel_commit_graph_queued_duration_seconds_total{job=~"^.*"})) >= 3600)`
Generated query for critical alert: `max((max(src_codeintel_commit_graph_queued_duration_seconds_total)) >= 3600)`
</details>

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,27 @@ func CodeIntelAutoIndexing() *monitoring.Dashboard {
Name: "codeintel-autoindexing",
Title: "Code Intelligence > Autoindexing",
Description: "The service at `internal/codeintel/autoindexing`.",
Variables: []monitoring.ContainerVariable{},
Variables: []monitoring.ContainerVariable{
{
Label: "Source",
Name: "source",
OptionsLabelValues: monitoring.ContainerVariableOptionsLabelValues{
Query: "src_codeintel_autoindexing_total{}",
LabelName: "app",
ExampleOption: "frontend",
},
WildcardAllValue: true,
Multi: false,
},
},
Groups: []monitoring.Group{
shared.CodeIntelligence.NewAutoindexingSummaryGroup(""),
shared.CodeIntelligence.NewAutoindexingServiceGroup(""),
shared.CodeIntelligence.NewAutoindexingGraphQLTransportGroup(""),
shared.CodeIntelligence.NewAutoindexingStoreGroup(""),
shared.CodeIntelligence.NewAutoindexingBackgroundJobGroup(""),
shared.CodeIntelligence.NewAutoindexingInferenceServiceGroup(""),
shared.CodeIntelligence.NewLuasandboxServiceGroup(""),
shared.CodeIntelligence.NewAutoindexingSummaryGroup("${source:regex}"),
shared.CodeIntelligence.NewAutoindexingServiceGroup("${source:regex}"),
shared.CodeIntelligence.NewAutoindexingGraphQLTransportGroup("${source:regex}"),
shared.CodeIntelligence.NewAutoindexingStoreGroup("${source:regex}"),
shared.CodeIntelligence.NewAutoindexingBackgroundJobGroup("${source:regex}"),
shared.CodeIntelligence.NewAutoindexingInferenceServiceGroup("${source:regex}"),
shared.CodeIntelligence.NewLuasandboxServiceGroup("${source:regex}"),
},
}
}

View File

@ -10,12 +10,24 @@ func CodeIntelCodeNav() *monitoring.Dashboard {
Name: "codeintel-codenav",
Title: "Code Intelligence > Code Nav",
Description: "The service at `internal/codeintel/codenav`.",
Variables: []monitoring.ContainerVariable{},
Variables: []monitoring.ContainerVariable{
{
Label: "Source",
Name: "source",
OptionsLabelValues: monitoring.ContainerVariableOptionsLabelValues{
Query: "src_codeintel_codenav_total{}",
LabelName: "app",
ExampleOption: "frontend",
},
WildcardAllValue: true,
Multi: false,
},
},
Groups: []monitoring.Group{
shared.CodeIntelligence.NewCodeNavServiceGroup(""),
shared.CodeIntelligence.NewCodeNavLsifStoreGroup(""),
shared.CodeIntelligence.NewCodeNavGraphQLTransportGroup(""),
shared.CodeIntelligence.NewCodeNavStoreGroup(""),
shared.CodeIntelligence.NewCodeNavServiceGroup("${source:regex}"),
shared.CodeIntelligence.NewCodeNavLsifStoreGroup("${source:regex}"),
shared.CodeIntelligence.NewCodeNavGraphQLTransportGroup("${source:regex}"),
shared.CodeIntelligence.NewCodeNavStoreGroup("${source:regex}"),
},
}
}

View File

@ -10,12 +10,24 @@ func CodeIntelPolicies() *monitoring.Dashboard {
Name: "codeintel-policies",
Title: "Code Intelligence > Policies",
Description: "The service at `internal/codeintel/policies`.",
Variables: []monitoring.ContainerVariable{},
Variables: []monitoring.ContainerVariable{
{
Label: "Source",
Name: "source",
OptionsLabelValues: monitoring.ContainerVariableOptionsLabelValues{
Query: "src_codeintel_policies_total{}",
LabelName: "app",
ExampleOption: "frontend",
},
WildcardAllValue: true,
Multi: false,
},
},
Groups: []monitoring.Group{
shared.CodeIntelligence.NewPoliciesServiceGroup(""),
shared.CodeIntelligence.NewPoliciesStoreGroup(""),
shared.CodeIntelligence.NewPoliciesGraphQLTransportGroup(""),
shared.CodeIntelligence.NewRepoMatcherTaskGroup(""),
shared.CodeIntelligence.NewPoliciesServiceGroup("${source:regex}"),
shared.CodeIntelligence.NewPoliciesStoreGroup("${source:regex}"),
shared.CodeIntelligence.NewPoliciesGraphQLTransportGroup("${source:regex}"),
shared.CodeIntelligence.NewRepoMatcherTaskGroup("${source:regex}"),
},
}
}

View File

@ -10,16 +10,28 @@ func CodeIntelUploads() *monitoring.Dashboard {
Name: "codeintel-uploads",
Title: "Code Intelligence > Uploads",
Description: "The service at `internal/codeintel/uploads`.",
Variables: []monitoring.ContainerVariable{},
Variables: []monitoring.ContainerVariable{
{
Label: "Source",
Name: "source",
OptionsLabelValues: monitoring.ContainerVariableOptionsLabelValues{
Query: "src_codeintel_uploads_total{}",
LabelName: "app",
ExampleOption: "frontend",
},
WildcardAllValue: true,
Multi: false,
},
},
Groups: []monitoring.Group{
shared.CodeIntelligence.NewUploadsServiceGroup(""),
shared.CodeIntelligence.NewUploadsStoreGroup(""),
shared.CodeIntelligence.NewUploadsBackgroundGroup(""),
shared.CodeIntelligence.NewUploadsGraphQLTransportGroup(""),
shared.CodeIntelligence.NewUploadsHTTPTransportGroup(""),
shared.CodeIntelligence.NewUploadsCleanupTaskGroup(""),
shared.CodeIntelligence.NewCommitGraphQueueGroup(""),
shared.CodeIntelligence.NewUploadsExpirationTaskGroup(""),
shared.CodeIntelligence.NewUploadsServiceGroup("${source:regex}"),
shared.CodeIntelligence.NewUploadsStoreGroup("${source:regex}"),
shared.CodeIntelligence.NewUploadsBackgroundGroup("${source:regex}"),
shared.CodeIntelligence.NewUploadsGraphQLTransportGroup("${source:regex}"),
shared.CodeIntelligence.NewUploadsHTTPTransportGroup("${source:regex}"),
shared.CodeIntelligence.NewUploadsCleanupTaskGroup("${source:regex}"),
shared.CodeIntelligence.NewCommitGraphQueueGroup("${source:regex}"),
shared.CodeIntelligence.NewUploadsExpirationTaskGroup("${source:regex}"),
},
}
}

View File

@ -9,7 +9,6 @@ func (codeIntelligence) NewAutoindexingSummaryGroup(containerName string) monito
Rows: []monitoring.Row{
{
monitoring.Observable(NoAlertsOption("none")(Observable{
Name: containerName,
Description: "auto-index jobs inserted over 5m",
Owner: monitoring.ObservableOwnerCodeIntel,
Query: "sum(increase(src_codeintel_dbstore_indexes_inserted[5m]))",