diff --git a/llama_stack/distribution/server/server.py b/llama_stack/distribution/server/server.py index 3bdeeef7c..dea56b1b2 100644 --- a/llama_stack/distribution/server/server.py +++ b/llama_stack/distribution/server/server.py @@ -226,6 +226,8 @@ class TracingMiddleware: self.app = app async def __call__(self, scope, receive, send): + if scope.get("type") == "lifespan": + return await self.app(scope, receive, send) path = scope.get("path", "") await start_trace(path, {"__location__": "server"}) try: