mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
use callback_settings when intializing otel
This commit is contained in:
parent
b36f964217
commit
7c9591881c
4 changed files with 51 additions and 4 deletions
|
@ -17,7 +17,7 @@ def initialize_callbacks_on_proxy(
|
|||
litellm_settings: dict,
|
||||
callback_specific_params: dict = {},
|
||||
):
|
||||
from litellm.proxy.proxy_server import prisma_client
|
||||
from litellm.proxy.proxy_server import callback_settings, prisma_client
|
||||
|
||||
verbose_proxy_logger.debug(
|
||||
f"{blue_color_code}initializing callbacks={value} on proxy{reset_color_code}"
|
||||
|
@ -34,7 +34,11 @@ def initialize_callbacks_on_proxy(
|
|||
from litellm.integrations.opentelemetry import OpenTelemetry
|
||||
from litellm.proxy import proxy_server
|
||||
|
||||
open_telemetry_logger = OpenTelemetry()
|
||||
_otel_settings = {}
|
||||
if "otel" in callback_settings:
|
||||
_otel_settings = callback_settings["otel"]
|
||||
|
||||
open_telemetry_logger = OpenTelemetry(**_otel_settings)
|
||||
|
||||
# Add Otel as a service callback
|
||||
if "otel" not in litellm.service_callback:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue