Start collecting client-side performance of `Blob` page
Created by: olafurpg
Previously, we didn't have any insight into the user-perceived performance of loading the blob page. Manual performance tests indicate that the browser spends a long time calculating HTML/CSS rules when viewing large files. We have a few ideas on how to optimize this critical path but first we want to start collecting metrics to validate that our optimizations are working as expected.
This commit adds a new OpenTelemetry dependency to the React SPA
and registers a new span when loading the blob page. Our backend
consumes the OpenTelemetry spans through the new /v1/traces
endpoint
and forwards them to an observability tool such as Honeycomb.
The new OpenTelemetry dependencies add ~36kb to the bundle size according to yarn workspace @sourcegraph/web analyze-bundle
. I think that's quite a lot. We might be able to reduce the overhead by using libhoney directly instead, if we are OK with hardcoding Honeycomb.
Test plan
n/a