Add OpenTelemetry observability with local JSONL traces (#347)
Co-authored-by: 0xallam <ahmed39652003@gmail.com>
This commit is contained in:
15
tests/llm/test_llm_otel.py
Normal file
15
tests/llm/test_llm_otel.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import litellm
|
||||
|
||||
from strix.llm.config import LLMConfig
|
||||
from strix.llm.llm import LLM
|
||||
|
||||
|
||||
def test_llm_does_not_modify_litellm_callbacks(monkeypatch) -> None:
|
||||
monkeypatch.setenv("STRIX_TELEMETRY", "1")
|
||||
monkeypatch.setenv("STRIX_OTEL_TELEMETRY", "1")
|
||||
monkeypatch.setattr(litellm, "callbacks", ["custom-callback"])
|
||||
|
||||
llm = LLM(LLMConfig(model_name="openai/gpt-5"), agent_name=None)
|
||||
|
||||
assert llm is not None
|
||||
assert litellm.callbacks == ["custom-callback"]
|
||||
Reference in New Issue
Block a user