-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Patch LiteLLM root span #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enables LiteLLM's root span feature for OpenTelemetry tracing by setting the USE_OTEL_LITELLM_REQUEST_SPAN environment variable. The changes add debugging capabilities and ensure consistent data structure in test metrics.
- Sets environment variable to enable LiteLLM request span in OpenTelemetry instrumentation
- Adds debug logging for span attributes in tests
- Ensures consistent data structure in validation metrics when triplets are missing
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| agentlightning/llm_proxy.py | Sets USE_OTEL_LITELLM_REQUEST_SPAN environment variable to enable LiteLLM root span for OpenTelemetry tracing |
| tests/llm_proxy/test_llm_proxy_gpu.py | Adds debug print statement to log span attributes for troubleshooting |
| agentlightning/verl/daemon.py | Adds has_reward field to sample stats when no triplets are found, making the data structure consistent with cases where triplets exist |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
agentlightning/llm_proxy.py
Outdated
| if _global_llm_proxy is not None: | ||
| logger.warning("A global LLMProxy is already set. Overwriting it with the new instance.") | ||
|
|
||
| # Patch: |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment "# Patch:" is vague and doesn't explain what is being patched or why. Consider updating this to clarify the purpose, such as:
# Enable LiteLLM root span for OpenTelemetry tracingThis would make it clear that this setting enables the LiteLLM request span in OpenTelemetry instrumentation.
| # Patch: | |
| # Enable LiteLLM root span for OpenTelemetry tracing |
|
/ci |
|
🚀 CI Watcher for correlation id-3587760245-mii9umgv triggered by comment 3587760245
✅ All runs completed. |
No description provided.