mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 02:32:40 +00:00
fix: tracing middleware to not start for lifespan events
This commit is contained in:
parent
ea6a4a14ce
commit
8e6f2dd797
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue