Merge pull request #4656 from BerriAI/litellm_otel_fix

[Proxy - OTEL] Fix logging DB, Redis Cache Reads
This commit is contained in:
Ishaan Jaff
2024-07-11 09:55:51 -07:00
committed by GitHub
2 changed files with 6 additions and 0 deletions
@@ -35,6 +35,10 @@ def initialize_callbacks_on_proxy(
open_telemetry_logger = OpenTelemetry()
# Add Otel as a service callback
if "otel" not in litellm.service_callback:
litellm.service_callback.append("otel")
imported_list.append(open_telemetry_logger)
setattr(proxy_server, "open_telemetry_logger", open_telemetry_logger)
elif isinstance(callback, str) and callback == "presidio":
+2
View File
@@ -35,6 +35,8 @@ general_settings:
LANGFUSE_SECRET_KEY: "os.environ/LANGFUSE_DEV_SK_KEY"
litellm_settings:
cache: true
callbacks: ["otel"]
guardrails:
- prompt_injection:
callbacks: [lakera_prompt_injection, hide_secrets]