sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.27k forks source link

Search Analytics MVP UI #46386

Open ggilmore opened 1 year ago

ggilmore commented 1 year ago

Part of https://github.com/sourcegraph/pr-faqs/issues/17

The Search Admin Experience PRFAQ discusses a feature we named "search analytics" (the name isn't final): a new feature that admins can use to see:

This idea came from our experience debugging search-related issues with our customers. Some users would complain that search "feels slow" or sometimes fails for the thing they're searching for - but it'd be hard to reason why this is the case.

We capture performance data in our Grafana dashboards (see the "search requests" section), but that data is aggregated across all searches. Unless there is a broad performance problem with all of search, the performance issue might not show up or be impossible to drill into further.

On sourcegraph.com, Honeycomb is the service we use to do that drilling. With it we can answer questions like: "Which user is running the most expensive search on sourcegraph.com? What other searchers has this user run? Are they legitimate, or are they bot-like (and should be banned)?"

Honeycomb is a paid service, so we can't expect our customers to use it. The idea behind "search analytics" is to ship a lightweight version of Honeycomb that could help us debug these issues better.

Honeycomb is a complex tool with neat charting features, but we'd target something simple for the MVP. We'd want to show the 20 or so longest-running searches over the last 24 hours in a view similar to the "raw data" view in honeycomb: a filterable table that's visible in the site admin area. Each row would have fields like:

Some natural extensions to the UI could include:

ggilmore commented 1 year ago

cc @sourcegraph/search-core

cc @felixfbecker , @rrhyne , @RafLeszczynski

ggilmore commented 1 year ago

Forked from https://sourcegraph.slack.com/archives/CHEKCRWKV/p1673465504333779

ggilmore commented 1 year ago

Some alternative name ideas from chatGPT:

Screen Shot 2023-01-12 at 11 58 45 AM
ggilmore commented 1 year ago

Renamed to search analytics