(Feat) - Add GCS Pub/Sub Logging integration for sending DB SpendLogs to BigQuery (#7976)

* add pub_sub

* fix custom batch logger for GCS PUB/SUB

* GCS_PUBSUB_PROJECT_ID

* e2e gcs pub sub

* add gcs pub sub

* fix logging

* add GcsPubSubLogger

* fix pub sub

* add pub sub

* docs gcs pub / sub

* docs on pub sub controls

* test_gcs_pub_sub

* fix publish_message

* test_async_gcs_pub_sub

* test_async_gcs_pub_sub
This commit is contained in:
Ishaan Jaff 2025-01-24 20:57:20 -08:00 committed by GitHub
parent c9a32ebf76
commit 74caef0843
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 458 additions and 24 deletions

View file

@ -58,7 +58,7 @@ from litellm.proxy.management_helpers.utils import (
add_new_member,
management_endpoint_wrapper,
)
from litellm.proxy.utils import PrismaClient
from litellm.proxy.utils import PrismaClient, _premium_user_check
router = APIRouter()
@ -1527,15 +1527,3 @@ def _set_team_metadata_field(
_premium_user_check()
team_data.metadata = team_data.metadata or {}
team_data.metadata[field_name] = value
def _premium_user_check():
from litellm.proxy.proxy_server import premium_user
if not premium_user:
raise HTTPException(
status_code=403,
detail={
"error": f"This feature is only available for LiteLLM Enterprise users. {CommonProxyErrors.not_premium_user.value}"
},
)