[PR #530] [MERGED] feat: Introduce tracing support for monitoring LlamaDeploy #528

Closed
opened 2026-02-16 02:15:30 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_deploy/pull/530
Author: @masci
Created: 6/4/2025
Status: Merged
Merged: 6/5/2025
Merged by: @masci

Base: mainHead: massi/tracing


📝 Commits (8)

📊 Changes

23 files changed (+2426 additions, -1522 deletions)

View changed files

📝 .taplo.toml (+5 -2)
📝 docker/run_apiserver.py (+1 -1)
📝 docker/run_autodeploy.py (+1 -1)
docs/docs/module_guides/llama_deploy/50_observability.md (+250 -0)
📝 e2e_tests/apiserver/conftest.py (+1 -1)
📝 llama_deploy/apiserver/__init__.py (+0 -9)
📝 llama_deploy/apiserver/__main__.py (+1 -1)
📝 llama_deploy/apiserver/app.py (+5 -0)
📝 llama_deploy/apiserver/deployment_config_parser.py (+5 -5)
📝 llama_deploy/apiserver/settings.py (+32 -0)
llama_deploy/apiserver/tracing.py (+237 -0)
📝 llama_deploy/cli/serve.py (+1 -1)
📝 llama_deploy/control_plane/server.py (+22 -6)
📝 llama_deploy/message_queues/__init__.py (+5 -5)
📝 llama_deploy/message_queues/base.py (+23 -13)
📝 llama_deploy/services/workflow.py (+95 -67)
📝 llama_deploy/types/core.py (+23 -0)
📝 pyproject.toml (+7 -0)
📝 tests/apiserver/routers/test_deployments.py (+1 -1)
📝 tests/apiserver/routers/test_status.py (+1 -1)

...and 3 more files

📄 Description

This PR introduces tracing support for LlamaDeploy. It's important to note that this is not about monitoring the workflows that are part of a deployment, rather about monitoring LlamaDeploy itself from an operations standpoint.
If you have tracing already enabled at the workflow level with something like this you don't need to enable tracing on LlamaDeploy.

Notes:

  • to avoid circular imports, I had to remove exporting too many symbols in different __init__.py. I think that's good in any case, the import structure was already going out of control
  • also to avoid circular imports, I used the if TYPE_CHECKING: import pattern wherever possible
  • there's a dedicated documentation page about observability in general, including tracing and metrics monitoring

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/llama_deploy/pull/530 **Author:** [@masci](https://github.com/masci) **Created:** 6/4/2025 **Status:** ✅ Merged **Merged:** 6/5/2025 **Merged by:** [@masci](https://github.com/masci) **Base:** `main` ← **Head:** `massi/tracing` --- ### 📝 Commits (8) - [`9c6c7ce`](https://github.com/run-llama/llama_deploy/commit/9c6c7cea12adf24c2d1ac6a3c157ed1e58c97374) feat: add tracing support - [`6b745a0`](https://github.com/run-llama/llama_deploy/commit/6b745a087ffb49c846cd11c6725d5563439003f3) fix - [`db0fdde`](https://github.com/run-llama/llama_deploy/commit/db0fdde6d7cdc5121c3be2d2620577825849c5fe) fix deps - [`8891b13`](https://github.com/run-llama/llama_deploy/commit/8891b13df093770ca99934a85f12efe3b34dd80b) simplify import structure - [`d97da2a`](https://github.com/run-llama/llama_deploy/commit/d97da2a1330cf3f646421f96f3cf27ceb03af72d) remove noise, simplify code - [`8c86239`](https://github.com/run-llama/llama_deploy/commit/8c86239015b9ccbcda5469d725cb367586e6766a) update lockfile - [`189c72f`](https://github.com/run-llama/llama_deploy/commit/189c72fb6eaa05a9615cf61b0897fcc7e6f2821b) update docs - [`59bb17f`](https://github.com/run-llama/llama_deploy/commit/59bb17ffde027225ea76e602e9ed8d05fff67036) fix e2e tests ### 📊 Changes **23 files changed** (+2426 additions, -1522 deletions) <details> <summary>View changed files</summary> 📝 `.taplo.toml` (+5 -2) 📝 `docker/run_apiserver.py` (+1 -1) 📝 `docker/run_autodeploy.py` (+1 -1) ➕ `docs/docs/module_guides/llama_deploy/50_observability.md` (+250 -0) 📝 `e2e_tests/apiserver/conftest.py` (+1 -1) 📝 `llama_deploy/apiserver/__init__.py` (+0 -9) 📝 `llama_deploy/apiserver/__main__.py` (+1 -1) 📝 `llama_deploy/apiserver/app.py` (+5 -0) 📝 `llama_deploy/apiserver/deployment_config_parser.py` (+5 -5) 📝 `llama_deploy/apiserver/settings.py` (+32 -0) ➕ `llama_deploy/apiserver/tracing.py` (+237 -0) 📝 `llama_deploy/cli/serve.py` (+1 -1) 📝 `llama_deploy/control_plane/server.py` (+22 -6) 📝 `llama_deploy/message_queues/__init__.py` (+5 -5) 📝 `llama_deploy/message_queues/base.py` (+23 -13) 📝 `llama_deploy/services/workflow.py` (+95 -67) 📝 `llama_deploy/types/core.py` (+23 -0) 📝 `pyproject.toml` (+7 -0) 📝 `tests/apiserver/routers/test_deployments.py` (+1 -1) 📝 `tests/apiserver/routers/test_status.py` (+1 -1) _...and 3 more files_ </details> ### 📄 Description This PR introduces tracing support for LlamaDeploy. It's important to note that this is not about monitoring the workflows that are part of a deployment, rather about monitoring LlamaDeploy itself from an operations standpoint. If you have tracing already enabled at the workflow level with something [like this](https://docs.llamaindex.ai/en/stable/module_guides/observability/#usage-pattern) you don't need to enable tracing on LlamaDeploy. Notes: - to avoid circular imports, I had to remove exporting too many symbols in different `__init__.py`. I think that's good in any case, the import structure was already going out of control - also to avoid circular imports, I used the `if TYPE_CHECKING: import` pattern wherever possible - there's a dedicated documentation page about observability in general, including tracing and metrics monitoring --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:15:30 -05:00
yindo closed this issue 2026-02-16 02:15:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#528