Skip to content

codeintel: Instrument upload endpoint

Warren Gifford requested to merge ef/instrument-upload-handler into main

Created by: efritz

Changes:

  • Add an observability object to the upload handler. Because this upload handler is registered on multiple endpoints (once for the executor proxy, once for external API, and once for internal API), we need to share the metrics. This prompted its move into the codeintel.Services struct so that we only need to initialize them once.
  • Moved auth checks into middleware WHERE THEY BELONG
  • Refactored the upload handler so that observability layers are more meaningful (reduced as much code that falls outside of RED metrics as possible; made the remaining stuff look the same and switch off of that so we get consistent observability for each endpoint handler).
  • Added tracing and some rudimentary metrics to upload handler, which was a black box before.

Future work:

  • Add dashboard for this in the frontend service definition
  • Add additional metrics (number of bytes received, upload size statistics, etc)
  • Additional tracing where necessary
  • Trigger tracing via src-cli invocation

Merge request reports

Loading