llama-stack-mirror/llama_stack/distribution
Dinesh Yeduguru 86f617a197
fix: tracing middleware to not start for lifespan events (#1730)
# What does this PR do?
Tracing middleware should not start tracing for lifespan events.
Lifespan event happens at server startup and shutdown and if we start
tracing for them, we will have an active trace for the lifetime of the
server, which messes up with regular tracing since we always expect the
traces to be never nested.

We started hitting this issue since
https://github.com/meta-llama/llama-stack/pull/1495.

## Test Plan
* llama stack run ~/.llama/distributions/fireworks/fireworks-run.yaml
* Verify in sqlite store that the trace now has non null span id
![Screenshot 2025-03-20 at 1 49
47 PM](https://github.com/user-attachments/assets/d77354a7-d5f1-4b53-a946-6adbd7a4f772)
2025-03-20 14:22:19 -07:00
..
routers feat(server): add attribute based access control for resources (#1703) 2025-03-19 21:28:52 -07:00
server fix: tracing middleware to not start for lifespan events (#1730) 2025-03-20 14:22:19 -07:00
store refactor: move a few tests to top-level tests/ directory 2025-03-03 17:33:39 -08:00
ui feat(api): simplify client imports (#1687) 2025-03-20 10:15:49 -07:00
utils refactor: simplify command execution and remove PTY handling (#1641) 2025-03-17 15:03:14 -07:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
access_control.py feat(server): add attribute based access control for resources (#1703) 2025-03-19 21:28:52 -07:00
build.py refactor: simplify command execution and remove PTY handling (#1641) 2025-03-17 15:03:14 -07:00
build_conda_env.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
build_container.sh fix: Add missing gcc in container build. Fixes #1716 (#1727) 2025-03-20 15:50:56 -04:00
build_venv.sh chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
client.py chore: move all Llama Stack types from llama-models to llama-stack (#1098) 2025-02-14 09:10:59 -08:00
common.sh fix: Fixing some small issues with the build scripts (#1132) 2025-02-19 22:20:49 -08:00
configure.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
datatypes.py feat(server): add attribute based access control for resources (#1703) 2025-03-19 21:28:52 -07:00
distribution.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
inspect.py chore: deprecate /v1/inspect/providers (#1678) 2025-03-19 20:27:06 -07:00
library_client.py feat: Add back inference metrics and preserve context variables across asyncio boundary (#1552) 2025-03-12 12:01:03 -07:00
providers.py fix: add shutdown method for ProviderImpl (#1670) 2025-03-17 14:55:40 -07:00
request_headers.py feat(server): add attribute based access control for resources (#1703) 2025-03-19 21:28:52 -07:00
resolver.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
stack.py feat: add provider API for listing and inspecting provider info (#1429) 2025-03-13 15:07:21 -07:00
start_stack.sh feat(logging): implement category-based logging (#1362) 2025-03-07 11:34:30 -08:00