mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(langfuse): keep telemetry dependency optional
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
This commit is contained in:
parent
5be1e40a84
commit
464c10d05c
1 changed files with 2 additions and 2 deletions
|
|
@ -18,8 +18,6 @@ from typing import (
|
|||
)
|
||||
|
||||
from packaging.version import Version
|
||||
from opentelemetry import trace as otel_trace
|
||||
|
||||
import litellm
|
||||
from litellm._logging import verbose_logger
|
||||
from litellm.constants import MAX_LANGFUSE_INITIALIZED_CLIENTS
|
||||
|
|
@ -1086,6 +1084,8 @@ def log_provider_specific_information_as_span(
|
|||
|
||||
def _set_langfuse_release(release: str | None) -> None:
|
||||
if release:
|
||||
from opentelemetry import trace as otel_trace
|
||||
|
||||
otel_trace.get_current_span().set_attribute("langfuse.release", release)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue