pass alert type on alerting handle

This commit is contained in:
Ishaan Jaff 2024-04-25 13:05:34 -07:00
parent 6337f5abd5
commit 1d5e70f7a0
3 changed files with 59 additions and 22 deletions

View file

@ -8743,7 +8743,9 @@ async def health_services_endpoint(
if "slack" in general_settings.get("alerting", []):
test_message = f"""\n🚨 `ProjectedLimitExceededError` 💸\n\n`Key Alias:` litellm-ui-test-alert \n`Expected Day of Error`: 28th March \n`Current Spend`: $100.00 \n`Projected Spend at end of month`: $1000.00 \n`Soft Limit`: $700"""
await proxy_logging_obj.alerting_handler(message=test_message, level="Low")
await proxy_logging_obj.alerting_handler(
message=test_message, level="Low", alert_type="budget_alerts"
)
return {
"status": "success",
"message": "Mock Slack Alert sent, verify Slack Alert Received on your channel",