Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Tooling: Log outgoing requests #44027

@vdavid

Description

@vdavid

We want to log all outgoing requests from Sourcegraph, and make them discoverable on the web UI.
Original initative by @mrnugget.

Goals:

  • Raise awareness of requests in dev mode. Developers should raise their eyebrows when there are bursts of requests.
  • Allows admins to see what’s happening and what the requests are.
  • Make it easy to duplicate these requests for debugging purposes: Add options to retry/rerun each request. Add “copy as curl” to each request.

Details:

  • Could hook into httpcli.NewExternalClientFactory to ensure that every request to the outside of Sourcegraph is logged.
  • We want to plan to Redis.
  • We can keep the last 50 requests or so per external host.
  • We want to strip out security-relevant data.
  • We want to record the caller, by going up the stack frame and finding it.
  • Enable logging these requests by default in developer mode.
  • We want a page that shows the last 50 requests per external host on the admin UI. Just by looking at the URL, it’s often easy to tell whether something fetches permissions, repos, code, or something else.

/cc @sourcegraph/integrations

Metadata

Metadata

Assignees

Labels

site-adminSite admin experience

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions