litellm-mirror/litellm/integrations/SlackAlerting
Ishaan Jaff 03b1db5a7d
(Feat) - Add PagerDuty Alerting Integration (#7478)
* define basic types

* fix verbose_logger.exception statement

* fix basic alerting

* test pager duty alerting

* test_pagerduty_alerting_high_failure_rate

* PagerDutyAlerting

* async_log_failure_event

* use pre_call_hook

* add _request_is_completed helper util

* update AlertingConfig

* rename PagerDutyInternalEvent

* _send_alert_if_thresholds_crossed

* use pagerduty as _custom_logger_compatible_callbacks_literal

* fix slack alerting imports

* fix imports in slack alerting

* PagerDutyAlerting

* fix _load_alerting_settings

* test_pagerduty_hanging_request_alerting

* working pager duty alerting

* fix linting

* doc pager duty alerting

* update hanging_response_handler

* fix import location

* update failure_threshold

* update async_pre_call_hook

* docs pagerduty

* test - callback_class_str_to_classType

* fix linting errors

* fix linting + testing error

* PagerDutyAlerting

* test_pagerduty_hanging_request_alerting

* fix unused imports

* docs pager duty

* @pytest.mark.flaky(retries=6, delay=2)

* test_model_info_bedrock_converse_enforcement
2025-01-01 07:12:51 -08:00
..
batching_handler.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
Readme.md (feat proxy slack alerting) - allow opting in to getting key / internal user alerts (#5990) 2024-10-01 10:49:22 -07:00
slack_alerting.py (Feat) - Add PagerDuty Alerting Integration (#7478) 2025-01-01 07:12:51 -08:00
utils.py (Feat) - Add PagerDuty Alerting Integration (#7478) 2025-01-01 07:12:51 -08:00

Slack Alerting on LiteLLM Gateway

This folder contains the Slack Alerting integration for LiteLLM Gateway.

Folder Structure

  • slack_alerting.py: This is the main file that handles sending different types of alerts
  • batching_handler.py: Handles Batching + sending Httpx Post requests to slack. Slack alerts are sent every 10s or when events are greater than X events. Done to ensure litellm has good performance under high traffic
  • types.py: This file contains the AlertType enum which is used to define the different types of alerts that can be sent to Slack.
  • utils.py: This file contains common utils used specifically for slack alerting

Further Reading