From a9caba33efc3ba5010dff170ed1b08f9046a6e03 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 21 Sep 2024 13:12:00 -0700 Subject: [PATCH] [Feat] Allow setting custom arize endpoint (#5709) * set arize endpoint * docs arize endpoint * fix arize endpoint --- docs/my-website/docs/observability/arize_integration.md | 1 + docs/my-website/docs/proxy/logging.md | 1 + litellm/litellm_core_utils/litellm_logging.py | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/observability/arize_integration.md b/docs/my-website/docs/observability/arize_integration.md index 652d79af5..17be003f8 100644 --- a/docs/my-website/docs/observability/arize_integration.md +++ b/docs/my-website/docs/observability/arize_integration.md @@ -62,6 +62,7 @@ litellm_settings: environment_variables: ARIZE_SPACE_KEY: "d0*****" ARIZE_API_KEY: "141a****" + ARIZE_ENDPOINT: "https://otlp.arize.com/v1" # OPTIONAL - your custom arize api endpoint ``` ## Support & Talk to Founders diff --git a/docs/my-website/docs/proxy/logging.md b/docs/my-website/docs/proxy/logging.md index 5523b95f8..89ed0bda5 100644 --- a/docs/my-website/docs/proxy/logging.md +++ b/docs/my-website/docs/proxy/logging.md @@ -1279,6 +1279,7 @@ litellm_settings: environment_variables: ARIZE_SPACE_KEY: "d0*****" ARIZE_API_KEY: "141a****" + ARIZE_ENDPOINT: "https://otlp.arize.com/v1" # OPTIONAL - your custom arize api endpoint ``` 2. Start Proxy diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index ca02ea3aa..2b5cd2187 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -2175,9 +2175,12 @@ def _init_custom_logger_compatible_class( OpenTelemetryConfig, ) + arize_endpoint = ( + os.environ.get("ARIZE_ENDPOINT", None) or "https://otlp.arize.com/v1" + ) otel_config = OpenTelemetryConfig( exporter="otlp_grpc", - endpoint="https://otlp.arize.com/v1", + endpoint=arize_endpoint, ) os.environ["OTEL_EXPORTER_OTLP_TRACES_HEADERS"] = ( f"space_key={os.getenv('ARIZE_SPACE_KEY')},api_key={os.getenv('ARIZE_API_KEY')}"