Skip to content

Extract DistributedTraceMiddleware into its own file

Problem to solve

In chore: refactors middlewares into a module (!2168 - merged), we started refactoring middleware into the middleware module, and splitting the test file. However, most of them are still in https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/blob/main/ai_gateway/api/middleware/base.py, and need to be extracted.

Implementation

The following class needs to be moved to their own file:

  • DistributedTraceMiddleware to ai_gateway/api/middleware/distributed_trace,
  • Tests to be moved from test/api/middleware/test_base.py to test/api/middleware/test_distributed_trace.py

Support contact: @eduardobonet