The goal of this PR is to make search blitz usable for customers who want to run it against their instance for continuous performance analysis. Specifically, this does two things: 1) Enables configuring the set of queries to run with the `SEARCH_BLITZ_QUERY_FILE` env var 2) Packages the image in our standard format so we can publish it |
||
|---|---|---|
| .. | ||
| attribution | ||
| scripts | ||
| .gitignore | ||
| api.go | ||
| attribution.graphql | ||
| BUILD.bazel | ||
| client.go | ||
| config_test.go | ||
| config.go | ||
| Dockerfile | ||
| image_test.yaml | ||
| main.go | ||
| prometheus.go | ||
| protocol.go | ||
| queries_dogfood.txt | ||
| queries.txt | ||
| query.go | ||
| README.md | ||
| search.graphql | ||
| stream_client.go | ||
Search-Blitz
The purpose of Search-Blitz is to provide a baseline for our search performance.
Search-Blitz calls the stream and GraphQL APIs for typical
queries in regular intervals. Sourcegraph recognizes the Search-Blitz's
User-Agent and sends metrics to Prometheus.
The dashboard is accessible on Grafana, section "Sentinel queries".
In addition to the dashboard that we ship with Sourcegraph, Search-Blitz is deployed with a dedicated instance of Prometheus and Grafana.
How to track a query
Add the query to queries.txt.
For attribution search add a .txt file to the attribution directory.
A custom set of queries can be provided at runtime by pointing to a query file with the SEARCH_BLITZ_QUERY_FILE env var.
How to deploy
-
Merge your changes to main
-
Build and upload a new docker image:
./scripts/build.sh <next-version, e.g. 0.0.2> -
Update the image tag in deploy-sourcegraph-cloud
-
(Optional) Apply the new manifest
kubectl apply -f ./configure/search-blitz
How to access Search-Blitz's dedicated Grafana
kubectl port-forward search-blitz-0 3000:3000 -n monitoring