diff --git a/doc/admin/observability/dashboards.md b/doc/admin/observability/dashboards.md index a6cc6de4f3c..2d748cf5d15 100644 --- a/doc/admin/observability/dashboards.md +++ b/doc/admin/observability/dashboards.md @@ -25654,9 +25654,9 @@ Query: `sum by (op)(increase(src_codeintel_ranking_file_reference_count_reducer_
-### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking symbol definitions janitor +### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking exported uploads janitor -#### codeintel-ranking: codeintel_ranking_symbol_definitions_janitor_records_scanned_total +#### codeintel-ranking: codeintel_ranking_exported_uploads_janitor_records_scanned_total

Records scanned every 5m

@@ -25671,13 +25671,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum(increase(src_codeintel_ranking_symbol_definitions_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum(increase(src_codeintel_ranking_exported_uploads_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_definitions_janitor_records_altered_total +#### codeintel-ranking: codeintel_ranking_exported_uploads_janitor_records_altered_total

Records altered every 5m

@@ -25692,13 +25692,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum(increase(src_codeintel_ranking_symbol_definitions_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum(increase(src_codeintel_ranking_exported_uploads_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_definitions_janitor_total +#### codeintel-ranking: codeintel_ranking_exported_uploads_janitor_total

Job invocation operations every 5m

@@ -25711,13 +25711,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_definitions_janitor_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum by (op)(increase(src_codeintel_ranking_exported_uploads_janitor_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_definitions_janitor_99th_percentile_duration +#### codeintel-ranking: codeintel_ranking_exported_uploads_janitor_99th_percentile_duration

99th percentile successful job invocation operation duration over 5m

@@ -25730,13 +25730,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_symbol_definitions_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))` +Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_exported_uploads_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))`

-#### codeintel-ranking: codeintel_ranking_symbol_definitions_janitor_errors_total +#### codeintel-ranking: codeintel_ranking_exported_uploads_janitor_errors_total

Job invocation operation errors every 5m

@@ -25749,13 +25749,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_definitions_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum by (op)(increase(src_codeintel_ranking_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_definitions_janitor_error_rate +#### codeintel-ranking: codeintel_ranking_exported_uploads_janitor_error_rate

Job invocation operation error rate over 5m

@@ -25768,15 +25768,15 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_definitions_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_symbol_definitions_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_symbol_definitions_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100` +Query: `sum by (op)(increase(src_codeintel_ranking_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_exported_uploads_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100`

-### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking symbol references janitor +### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking deleted exported uploads janitor -#### codeintel-ranking: codeintel_ranking_symbol_references_janitor_records_scanned_total +#### codeintel-ranking: codeintel_ranking_deleted_exported_uploads_janitor_records_scanned_total

Records scanned every 5m

@@ -25791,13 +25791,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum(increase(src_codeintel_ranking_symbol_references_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_references_janitor_records_altered_total +#### codeintel-ranking: codeintel_ranking_deleted_exported_uploads_janitor_records_altered_total

Records altered every 5m

@@ -25812,13 +25812,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum(increase(src_codeintel_ranking_symbol_references_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_references_janitor_total +#### codeintel-ranking: codeintel_ranking_deleted_exported_uploads_janitor_total

Job invocation operations every 5m

@@ -25831,13 +25831,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_references_janitor_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum by (op)(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_references_janitor_99th_percentile_duration +#### codeintel-ranking: codeintel_ranking_deleted_exported_uploads_janitor_99th_percentile_duration

99th percentile successful job invocation operation duration over 5m

@@ -25850,13 +25850,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_symbol_references_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))` +Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_deleted_exported_uploads_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))`

-#### codeintel-ranking: codeintel_ranking_symbol_references_janitor_errors_total +#### codeintel-ranking: codeintel_ranking_deleted_exported_uploads_janitor_errors_total

Job invocation operation errors every 5m

@@ -25869,13 +25869,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_references_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum by (op)(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_references_janitor_error_rate +#### codeintel-ranking: codeintel_ranking_deleted_exported_uploads_janitor_error_rate

Job invocation operation error rate over 5m

@@ -25888,15 +25888,15 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_references_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_symbol_references_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_symbol_references_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100` +Query: `sum by (op)(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_deleted_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100`

-### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking symbol initial paths janitor +### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking abandoned exported uploads janitor -#### codeintel-ranking: codeintel_ranking_symbol_initial_paths_janitor_records_scanned_total +#### codeintel-ranking: codeintel_ranking_abandoned_exported_uploads_janitor_records_scanned_total

Records scanned every 5m

@@ -25911,13 +25911,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum(increase(src_codeintel_ranking_symbol_initial_paths_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_initial_paths_janitor_records_altered_total +#### codeintel-ranking: codeintel_ranking_abandoned_exported_uploads_janitor_records_altered_total

Records altered every 5m

@@ -25932,13 +25932,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum(increase(src_codeintel_ranking_symbol_initial_paths_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_initial_paths_janitor_total +#### codeintel-ranking: codeintel_ranking_abandoned_exported_uploads_janitor_total

Job invocation operations every 5m

@@ -25951,13 +25951,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_initial_paths_janitor_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_initial_paths_janitor_99th_percentile_duration +#### codeintel-ranking: codeintel_ranking_abandoned_exported_uploads_janitor_99th_percentile_duration

99th percentile successful job invocation operation duration over 5m

@@ -25970,13 +25970,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_symbol_initial_paths_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))` +Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_abandoned_exported_uploads_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))`

-#### codeintel-ranking: codeintel_ranking_symbol_initial_paths_janitor_errors_total +#### codeintel-ranking: codeintel_ranking_abandoned_exported_uploads_janitor_errors_total

Job invocation operation errors every 5m

@@ -25989,13 +25989,13 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_initial_paths_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))` +Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))`

-#### codeintel-ranking: codeintel_ranking_symbol_initial_paths_janitor_error_rate +#### codeintel-ranking: codeintel_ranking_abandoned_exported_uploads_janitor_error_rate

Job invocation operation error rate over 5m

@@ -26008,367 +26008,7 @@ To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking
Technical details -Query: `sum by (op)(increase(src_codeintel_ranking_symbol_initial_paths_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_symbol_initial_paths_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_symbol_initial_paths_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100` - -
- -
- -### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking abandoned definitions janitor - -#### codeintel-ranking: codeintel_ranking_abandoned_definitions_janitor_records_scanned_total - -

Records scanned every 5m

- -The number of candidate records considered for cleanup. - -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101000` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum(increase(src_codeintel_ranking_abandoned_definitions_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_definitions_janitor_records_altered_total - -

Records altered every 5m

- -The number of candidate records altered as part of cleanup. - -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101001` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum(increase(src_codeintel_ranking_abandoned_definitions_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_definitions_janitor_total - -

Job invocation operations every 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101010` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_definitions_janitor_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_definitions_janitor_99th_percentile_duration - -

99th percentile successful job invocation operation duration over 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101011` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_abandoned_definitions_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_definitions_janitor_errors_total - -

Job invocation operation errors every 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101012` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_definitions_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_definitions_janitor_error_rate - -

Job invocation operation error rate over 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101013` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_definitions_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_abandoned_definitions_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_abandoned_definitions_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100` - -
- -
- -### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking abandoned references janitor - -#### codeintel-ranking: codeintel_ranking_abandoned_references_janitor_records_scanned_total - -

Records scanned every 5m

- -The number of candidate records considered for cleanup. - -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101100` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum(increase(src_codeintel_ranking_abandoned_references_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_references_janitor_records_altered_total - -

Records altered every 5m

- -The number of candidate records altered as part of cleanup. - -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101101` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum(increase(src_codeintel_ranking_abandoned_references_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_references_janitor_total - -

Job invocation operations every 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101110` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_references_janitor_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_references_janitor_99th_percentile_duration - -

99th percentile successful job invocation operation duration over 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101111` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_abandoned_references_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_references_janitor_errors_total - -

Job invocation operation errors every 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101112` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_references_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_references_janitor_error_rate - -

Job invocation operation error rate over 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101113` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_references_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_abandoned_references_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_abandoned_references_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100` - -
- -
- -### Code Intelligence > Ranking: Codeintel: Uploads > Janitor task > Codeintel ranking abandoned initial counts janitor - -#### codeintel-ranking: codeintel_ranking_abandoned_initial_counts_janitor_records_scanned_total - -

Records scanned every 5m

- -The number of candidate records considered for cleanup. - -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101200` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_records_scanned_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_initial_counts_janitor_records_altered_total - -

Records altered every 5m

- -The number of candidate records altered as part of cleanup. - -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101201` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_records_altered_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_initial_counts_janitor_total - -

Job invocation operations every 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101210` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_initial_counts_janitor_99th_percentile_duration - -

99th percentile successful job invocation operation duration over 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101211` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_abandoned_initial_counts_janitor_duration_seconds_bucket{job=~"^${source:regex}.*"}[5m])))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_initial_counts_janitor_errors_total - -

Job invocation operation errors every 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101212` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))` - -
- -
- -#### codeintel-ranking: codeintel_ranking_abandoned_initial_counts_janitor_error_rate - -

Job invocation operation error rate over 5m

- -This panel has no related alerts. - -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101213` on your Sourcegraph instance. - -*Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* - -
-Technical details - -Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_abandoned_initial_counts_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100` +Query: `sum by (op)(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m])) / (sum by (op)(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_total{job=~"^${source:regex}.*"}[5m])) + sum by (op)(increase(src_codeintel_ranking_abandoned_exported_uploads_janitor_errors_total{job=~"^${source:regex}.*"}[5m]))) * 100`
@@ -26384,7 +26024,7 @@ The number of candidate records considered for cleanup. This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101300` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101000` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26405,7 +26045,7 @@ The number of candidate records altered as part of cleanup. This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101301` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101001` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26424,7 +26064,7 @@ Query: `sum(increase(src_codeintel_ranking_rank_counts_janitor_records_altered_t This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101310` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101010` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26443,7 +26083,7 @@ Query: `sum by (op)(increase(src_codeintel_ranking_rank_counts_janitor_total{job This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101311` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101011` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26462,7 +26102,7 @@ Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_rank This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101312` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101012` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26481,7 +26121,7 @@ Query: `sum by (op)(increase(src_codeintel_ranking_rank_counts_janitor_errors_to This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101313` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101013` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26504,7 +26144,7 @@ The number of candidate records considered for cleanup. This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101400` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101100` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26525,7 +26165,7 @@ The number of candidate records altered as part of cleanup. This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101401` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101101` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26544,7 +26184,7 @@ Query: `sum(increase(src_codeintel_ranking_rank_janitor_records_altered_total{jo This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101410` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101110` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26563,7 +26203,7 @@ Query: `sum by (op)(increase(src_codeintel_ranking_rank_janitor_total{job=~"^${s This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101411` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101111` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26582,7 +26222,7 @@ Query: `histogram_quantile(0.99, sum by (le,op)(rate(src_codeintel_ranking_rank This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101412` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101112` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* @@ -26601,7 +26241,7 @@ Query: `sum by (op)(increase(src_codeintel_ranking_rank_janitor_errors_total{job This panel has no related alerts. -To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101413` on your Sourcegraph instance. +To see this panel, visit `/-/debug/grafana/d/codeintel-ranking/codeintel-ranking?viewPanel=101113` on your Sourcegraph instance. *Managed by the [Sourcegraph Code intelligence team](https://handbook.sourcegraph.com/departments/engineering/teams/code-intelligence).* diff --git a/enterprise/internal/codeintel/ranking/internal/background/exporter/job.go b/enterprise/internal/codeintel/ranking/internal/background/exporter/job.go index 73e6c607490..ddb678fee7e 100644 --- a/enterprise/internal/codeintel/ranking/internal/background/exporter/job.go +++ b/enterprise/internal/codeintel/ranking/internal/background/exporter/job.go @@ -19,8 +19,6 @@ import ( "github.com/sourcegraph/sourcegraph/internal/observation" ) -const recordTypeName = "path count inputs" - func NewSymbolExporter( observationCtx *observation.Context, store store.Store, @@ -33,7 +31,7 @@ func NewSymbolExporter( Name: name, Description: "Exports SCIP data to ranking definitions and reference tables.", Interval: config.Interval, - Metrics: background.NewPipelineMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewPipelineMetrics(observationCtx, name), ProcessFunc: func(ctx context.Context) (numRecordsProcessed int, numRecordsAltered background.TaggedCounts, err error) { numUploadsScanned, numDefinitionsInserted, numReferencesInserted, err := exportRankingGraph( ctx, diff --git a/enterprise/internal/codeintel/ranking/internal/background/janitor/job.go b/enterprise/internal/codeintel/ranking/internal/background/janitor/job.go index 68d0ea15f3a..c91ecbfc814 100644 --- a/enterprise/internal/codeintel/ranking/internal/background/janitor/job.go +++ b/enterprise/internal/codeintel/ranking/internal/background/janitor/job.go @@ -12,8 +12,6 @@ import ( "github.com/sourcegraph/sourcegraph/internal/observation" ) -const recordTypeName = "path count inputs" - func NewExportedUploadsJanitor( observationCtx *observation.Context, store store.Store, @@ -25,7 +23,7 @@ func NewExportedUploadsJanitor( Name: name, Description: "Soft-deletes stale data from the ranking exported uploads table.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned int, numRecordsAltered int, err error) { return softDeleteStaleExportedUploads(ctx, store) }, @@ -43,7 +41,7 @@ func NewDeletedUploadsJanitor( Name: name, Description: "Removes soft-deleted data from the ranking exported uploads table no longer being read by a mapper process.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned int, numRecordsAltered int, err error) { numDeleted, err := vacuumDeletedExportedUploads(ctx, store) return numDeleted, numDeleted, err @@ -62,7 +60,7 @@ func NewAbandonedExportedUploadsJanitor( Name: name, Description: "Removes ranking exported uploads records for old graph keys.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned int, numRecordsAltered int, err error) { numDeleted, err := vacuumAbandonedExportedUploads(ctx, store) return numDeleted, numDeleted, err @@ -81,7 +79,7 @@ func NewRankCountsJanitor( Name: name, Description: "Removes old path count input records.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned int, numRecordsAltered int, err error) { numDeleted, err := vacuumStaleGraphs(ctx, store) return numDeleted, numDeleted, err @@ -100,7 +98,7 @@ func NewRankJanitor( Name: name, Description: "Removes stale ranking data.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned int, numRecordsAltered int, err error) { return vacuumStaleRanks(ctx, store) }, diff --git a/enterprise/internal/codeintel/ranking/internal/background/mapper/job.go b/enterprise/internal/codeintel/ranking/internal/background/mapper/job.go index e88141011af..a64497aa71f 100644 --- a/enterprise/internal/codeintel/ranking/internal/background/mapper/job.go +++ b/enterprise/internal/codeintel/ranking/internal/background/mapper/job.go @@ -12,8 +12,6 @@ import ( "github.com/sourcegraph/sourcegraph/internal/observation" ) -const recordTypeName = "path count inputs" - func NewMapper( observationCtx *observation.Context, store store.Store, @@ -25,7 +23,7 @@ func NewMapper( Name: name, Description: "Joins ranking definition and references together to create document path count records.", Interval: config.Interval, - Metrics: background.NewPipelineMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewPipelineMetrics(observationCtx, name), ProcessFunc: func(ctx context.Context) (numRecordsProcessed int, numRecordsAltered background.TaggedCounts, err error) { numReferencesScanned, nuPathCountInputsInserted, err := mapRankingGraph(ctx, store, config.BatchSize) if err != nil { @@ -48,7 +46,7 @@ func NewSeedMapper( Name: name, Description: "Adds initial zero counts to files that may not contain any known references.", Interval: config.Interval, - Metrics: background.NewPipelineMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewPipelineMetrics(observationCtx, name), ProcessFunc: func(ctx context.Context) (numRecordsProcessed int, numRecordsAltered background.TaggedCounts, err error) { numInitialPathsScanned, nuPathCountInputsInserted, err := mapInitializerRankingGraph(ctx, store, config.BatchSize) if err != nil { diff --git a/enterprise/internal/codeintel/ranking/internal/background/reducer/job.go b/enterprise/internal/codeintel/ranking/internal/background/reducer/job.go index 0eedc089818..dd39b028748 100644 --- a/enterprise/internal/codeintel/ranking/internal/background/reducer/job.go +++ b/enterprise/internal/codeintel/ranking/internal/background/reducer/job.go @@ -12,8 +12,6 @@ import ( "github.com/sourcegraph/sourcegraph/internal/observation" ) -const recordTypeName = "path count inputs" - func NewReducer( observationCtx *observation.Context, store store.Store, @@ -25,7 +23,7 @@ func NewReducer( Name: name, Description: "Aggregates records from `codeintel_ranking_path_counts_inputs` into `codeintel_path_ranks`.", Interval: config.Interval, - Metrics: background.NewPipelineMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewPipelineMetrics(observationCtx, name), ProcessFunc: func(ctx context.Context) (numRecordsProcessed int, numRecordsAltered background.TaggedCounts, err error) { numPathCountInputsScanned, numRanksUpdated, err := reduceRankingGraph(ctx, store, config.BatchSize) return numPathCountInputsScanned, background.NewSingleCount(numRanksUpdated), err diff --git a/enterprise/internal/codeintel/shared/background/janitor_job.go b/enterprise/internal/codeintel/shared/background/janitor_job.go index 517b443c596..f8a70015df6 100644 --- a/enterprise/internal/codeintel/shared/background/janitor_job.go +++ b/enterprise/internal/codeintel/shared/background/janitor_job.go @@ -33,7 +33,6 @@ type JanitorMetrics struct { func NewJanitorMetrics( observationCtx *observation.Context, name string, - recordTypeName string, ) *JanitorMetrics { replacer := strings.NewReplacer( ".", "_", @@ -68,11 +67,11 @@ func NewJanitorMetrics( numRecordsScanned := counter( fmt.Sprintf("src_%s_records_scanned_total", metricName), - fmt.Sprintf("The number of %s records scanned by %s.", recordTypeName, name), + fmt.Sprintf("The number of records scanned by %s.", name), ) numRecordsAltered := counter( fmt.Sprintf("src_%s_records_altered_total", metricName), - fmt.Sprintf("The number of %s records altered by %s.", recordTypeName, name), + fmt.Sprintf("The number of records altered by %s.", name), ) return &JanitorMetrics{ diff --git a/enterprise/internal/codeintel/shared/background/pipeline_job.go b/enterprise/internal/codeintel/shared/background/pipeline_job.go index 8855d9cfdaf..e82970a89ff 100644 --- a/enterprise/internal/codeintel/shared/background/pipeline_job.go +++ b/enterprise/internal/codeintel/shared/background/pipeline_job.go @@ -33,11 +33,7 @@ type PipelineMetrics struct { numRecordsAltered *prometheus.CounterVec } -func NewPipelineMetrics( - observationCtx *observation.Context, - name string, - recordTypeName string, -) *PipelineMetrics { +func NewPipelineMetrics(observationCtx *observation.Context, name string) *PipelineMetrics { replacer := strings.NewReplacer( ".", "_", "-", "_", @@ -81,12 +77,12 @@ func NewPipelineMetrics( numRecordsProcessed := counter( fmt.Sprintf("src_%s_records_processed_total", metricName), - fmt.Sprintf("The number of %s records processed by %s.", recordTypeName, name), + fmt.Sprintf("The number of records processed by %s.", name), ) numRecordsAltered := counterVec( fmt.Sprintf("src_%s_records_altered_total", metricName), - fmt.Sprintf("The number of %s records written/modified by %s.", recordTypeName, name), + fmt.Sprintf("The number of records written/modified by %s.", name), ) return &PipelineMetrics{ diff --git a/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup.go b/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup.go index f4aaddfed3d..5430e6e7106 100644 --- a/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup.go +++ b/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup.go @@ -17,8 +17,6 @@ import ( "github.com/sourcegraph/sourcegraph/lib/errors" ) -const recordTypeName = "SCIP metadata" - func NewDeletedRepositoryJanitor( store store.Store, config *Config, @@ -30,7 +28,7 @@ func NewDeletedRepositoryJanitor( Name: name, Description: "Removes upload records associated with an unknown repository.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.DeleteUploadsWithoutRepository(ctx, time.Now()) }, @@ -52,7 +50,7 @@ func NewUnknownCommitJanitor( Name: name, Description: "Removes upload records associated with an unknown commit.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.ProcessSourcedCommits( ctx, @@ -102,7 +100,7 @@ func NewAbandonedUploadJanitor( Name: name, Description: "Removes upload records that did did not receive a full payload from the user.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.DeleteUploadsStuckUploading(ctx, time.Now().UTC().Add(-config.UploadTimeout)) }, @@ -128,7 +126,7 @@ func NewExpiredUploadJanitor( Name: name, Description: "Soft-deletes unreferenced upload records that are not protected by any data retention policy.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.SoftDeleteExpiredUploads(ctx, expiredUploadsBatchSize) }, @@ -146,7 +144,7 @@ func NewExpiredUploadTraversalJanitor( Name: name, Description: "Soft-deletes a tree of externally unreferenced upload records that are not protected by any data retention policy.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.SoftDeleteExpiredUploadsViaTraversal(ctx, expiredUploadsMaxTraversal) }, @@ -168,7 +166,7 @@ func NewHardDeleter( Name: name, Description: "Deleted data associated with soft-deleted upload records.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { const uploadsBatchSize = 100 options := shared.GetUploadsOptions{ @@ -233,7 +231,7 @@ func NewAuditLogJanitor( Name: name, Description: "Deletes sufficiently old upload audit log records.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.DeleteOldAuditLogs(ctx, config.AuditLogMaxAge, time.Now()) }, @@ -254,7 +252,7 @@ func NewSCIPExpirationTask( Name: name, Description: "Deletes SCIP document payloads that are not referenced by any index.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return lsifStore.DeleteUnreferencedDocuments(ctx, config.UnreferencedDocumentBatchSize, config.UnreferencedDocumentMaxAge, time.Now()) }, diff --git a/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup2.go b/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup2.go index 145135e7c35..55dd9c24f67 100644 --- a/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup2.go +++ b/enterprise/internal/codeintel/uploads/internal/background/janitor/job_cleanup2.go @@ -11,8 +11,6 @@ import ( "github.com/sourcegraph/sourcegraph/internal/observation" ) -const recordTypeName2 = "autoindexing" - func NewUnknownRepositoryJanitor( store store.Store, config *Config, @@ -24,7 +22,7 @@ func NewUnknownRepositoryJanitor( Name: name, Description: "Removes index records associated with an unknown repository.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName2), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.DeleteIndexesWithoutRepository(ctx, time.Now()) }, @@ -46,7 +44,7 @@ func NewUnknownCommitJanitor2( Name: name, Description: "Removes index records associated with an unknown commit.", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName2), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.ProcessStaleSourcedCommits( ctx, @@ -75,7 +73,7 @@ func NewExpiredRecordJanitor( Name: name, Description: "Removes old index records", Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName2), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { return store.ExpireFailedRecords(ctx, config.FailedIndexBatchSize, config.FailedIndexMaxAge, time.Now()) }, diff --git a/enterprise/internal/codeintel/uploads/internal/background/janitor/job_reconciler.go b/enterprise/internal/codeintel/uploads/internal/background/janitor/job_reconciler.go index df3fec6e51a..cd6f6708b2d 100644 --- a/enterprise/internal/codeintel/uploads/internal/background/janitor/job_reconciler.go +++ b/enterprise/internal/codeintel/uploads/internal/background/janitor/job_reconciler.go @@ -19,7 +19,6 @@ func NewFrontendDBReconciler( return newReconciler( "codeintel.uploads.reconciler.scip-metadata", "Counts SCIP metadata records for which there is no data in the codeintel-db schema.", - "SCIP metadata", &storeWrapper{store}, &lsifStoreWrapper{lsifstore}, config, @@ -36,7 +35,6 @@ func NewCodeIntelDBReconciler( return newReconciler( "codeintel.uploads.reconciler.scip-data", "Removes SCIP data records for which there is no known associated metadata in the frontend schema.", - "SCIP data", &lsifStoreWrapper{lsifstore}, &storeWrapper{store}, config, @@ -59,7 +57,6 @@ type reconcileStore interface { func newReconciler( name string, description string, - recordTypeName string, sourceStore sourceStore, reconcileStore reconcileStore, config *Config, @@ -69,7 +66,7 @@ func newReconciler( Name: name, Description: description, Interval: config.Interval, - Metrics: background.NewJanitorMetrics(observationCtx, name, recordTypeName), + Metrics: background.NewJanitorMetrics(observationCtx, name), CleanupFunc: func(ctx context.Context) (numRecordsScanned, numRecordsAltered int, _ error) { candidateIDs, err := sourceStore.Candidates(ctx, config.ReconcilerBatchSize) if err != nil { diff --git a/enterprise/internal/own/background/background.go b/enterprise/internal/own/background/background.go index 854633c3939..b7e521d3131 100644 --- a/enterprise/internal/own/background/background.go +++ b/enterprise/internal/own/background/background.go @@ -10,6 +10,7 @@ import ( "golang.org/x/time/rate" "github.com/sourcegraph/log" + "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/shared/background" "github.com/sourcegraph/sourcegraph/internal/api" "github.com/sourcegraph/sourcegraph/internal/conf" @@ -114,7 +115,7 @@ func NewOwnBackgroundWorker(ctx context.Context, db database.DB, observationCtx Name: "own-background-jobs-janitor", Description: "Janitor for own-background-jobs queue", Interval: time.Minute * 5, - Metrics: background.NewJanitorMetrics(observationCtx, "own-background-jobs-janitor", "own-background"), + Metrics: background.NewJanitorMetrics(observationCtx, "own-background-jobs-janitor"), CleanupFunc: janitorFunc(db, time.Hour*24*7), }) return []goroutine.BackgroundRoutine{worker, resetter, janitor} diff --git a/monitoring/definitions/shared/codeintel_ranking.go b/monitoring/definitions/shared/codeintel_ranking.go index 6044296c462..e6e51e87372 100644 --- a/monitoring/definitions/shared/codeintel_ranking.go +++ b/monitoring/definitions/shared/codeintel_ranking.go @@ -123,13 +123,11 @@ func (codeIntelligence) NewRankingPipelineTaskGroups(containerName string) []mon } // Tasks: -// - codeintel_ranking_symbol_exporter -// - codeintel_ranking_symbol_definitions_janitor -// - codeintel_ranking_symbol_references_janitor +// - codeintel_ranking_exported_uploads_janitor +// - codeintel_ranking_deleted_exported_uploads_janitor +// - codeintel_ranking_abandoned_exported_uploads_janitor // - codeintel_ranking_rank_counts_janitor // - codeintel_ranking_rank_janitor -// - codeintel_ranking_file_reference_count_mapper -// - codeintel_ranking_file_reference_count_reducer // // Suffixes: // - _total @@ -142,12 +140,9 @@ func (codeIntelligence) NewRankingJanitorTaskGroups(containerName string) []moni "Uploads > Janitor task", containerName, []string{ - "codeintel_ranking_symbol_definitions_janitor", - "codeintel_ranking_symbol_references_janitor", - "codeintel_ranking_symbol_initial_paths_janitor", - "codeintel_ranking_abandoned_definitions_janitor", - "codeintel_ranking_abandoned_references_janitor", - "codeintel_ranking_abandoned_initial_counts_janitor", + "codeintel_ranking_exported_uploads_janitor", + "codeintel_ranking_deleted_exported_uploads_janitor", + "codeintel_ranking_abandoned_exported_uploads_janitor", "codeintel_ranking_rank_counts_janitor", "codeintel_ranking_rank_janitor", },