sourcegraph/cmd
Robert Lin 4a33f98202
frontend/auth: fix and test telemetry V2 user assignment (#61898)
Some pretty gnarly code out here, but the gist is to fix some missing user IDs from the V2 telemetry that this massive `GetAndSaveUser` thing reports, caused by a lack of user ID in the context.

The core changes are:

1. Parameterize some `GetAndSaveUser` dependencies (logger, telemetry recorder) to make testing easier (improve visibility of logs on failures etc). The change cascades a bit but should be harmless.
2. Generate a `telemetryCtx` with user actor inserted at various point so that telemetry recorder can pick it up. This is a separate context to avoid unexpected auth security problems.
3. Add tests that assert users are (or aren't) included in telemetry events recorded by `GetAndSaveUser`

Slack context: https://sourcegraph.slack.com/archives/C01PQEVJ5A9/p1712896597312409?thread_ts=1712874663.564049&cid=C01PQEVJ5A9

## Test plan

New and existing tests pass
2024-04-16 12:35:52 -07:00
..
appliance cmd/appliance: Add appliance service boilerplate / stub the service (#61706) 2024-04-10 19:53:40 -04:00
batcheshelper Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
blobstore Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
bundled-executor Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
cody-gateway chore: Remove dead code (#61899) 2024-04-16 10:17:47 +02:00
embeddings Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
executor chore: Remove dead code (#61899) 2024-04-16 10:17:47 +02:00
executor-kubernetes Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
frontend frontend/auth: fix and test telemetry V2 user assignment (#61898) 2024-04-16 12:35:52 -07:00
gitserver gitserver: Serve Refs via gRPC method (#60323) 2024-04-16 14:28:25 +02:00
loadtest Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
migrator Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
msp-example Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
pings Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
precise-code-intel-worker Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
repo-updater Remove p4 test from repo-updater image (#61928) 2024-04-16 09:56:16 -04:00
searcher Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
server Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
symbols chore: Remove dead code (#61899) 2024-04-16 10:17:47 +02:00
syntactic-code-intel-worker Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
telemetry-gateway telemetry-gateway: distinguish between retryable/nonretryable errors, telemetry: add callsite validation of feature/action (#61906) 2024-04-16 10:42:17 -07:00
worker telemetry-gateway: use live dev instance locally by default (#61897) 2024-04-16 11:01:49 -07:00
README.md Reminder to keep architecture diagram in-sync (#36869) 2022-06-08 19:40:36 -07:00

This directory contains Sourcegraph services and binaries.

When a services is added, removed, or when a service's dependencies change, update our architecture diagram.