Improve system message extraction in traced_llm

Enhanced the logic for extracting the system message in the traced_llm decorator to support LLMContext via adapter and handle exceptions gracefully. This improves compatibility with different context types and ensures better tracing information.
This commit is contained in:
Kinshuk Bairagi
2026-01-14 21:46:58 +05:30
parent 0dc95692ba
commit 9cc2644719
2 changed files with 19 additions and 1 deletions

1
changelog/3449.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed telemetry record correct system_instruction in span for LLM services