Skip to content

debug: add tunnel for Sentry events via frontend

Administrator requested to merge devx/add-sentry-tunnel into main

Created by: jhchabran

Partially fixes https://github.com/sourcegraph/sourcegraph/issues/26981

It also seems that we're hardcoding the sentry DSNs on the client side, see https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/client/browser/src/shared/sentry/index.ts

Presently, this makes the sentry tunnel enabled for dotcom, as its present siteconfig provides a dsn which we use to determine if we want to forward events or not.

Test plan

Tested locally with:

ENABLE_MONITORING=true sg start dotcom + assigning a proper DSN in the site config.

See the submitted event that went through the tunnel: https://sentry.io/organizations/sourcegraph/issues/3408898932/?query=is%3Aunresolved

Another one, after making it configurable through the siteadmin: https://sentry.io/organizations/sourcegraph/issues/3416802250/?query=is%3Aunresolved

Merge request reports

Loading