Skip to content

Conversation

@mfittko
Copy link

@mfittko mfittko commented May 19, 2025

Add CloudWatch Logging Support

Relevant issues

Implements enhanced logging capability for AWS CloudWatch

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
✅ Test

Changes

This PR adds support for AWS CloudWatch logging integration to LiteLLM.

Summary

Implements complete CloudWatch logging integration. This allows:

  1. Logging LiteLLM activity to AWS CloudWatch
  2. Standardized log format across all logging destinations

Implementation Details

File Change Type Description
litellm/integrations/cloud_watch.py New CloudWatch integration module
litellm/litellm_core_utils/litellm_logging.py Modified Refactored AWS logging support
litellm/utils.py Modified Added CloudWatch to async callback logic
litellm/init.py Modified Added cloudwatch_callback_params attribute

Testing

  • Added comprehensive tests for CloudWatch integration in tests/litellm/integrations/test_cloud_watch.py
  • Fixed test initialization issues with proper DualCache mocking

Configuration

CloudWatch logging can be configured in LiteLLM config using:

litellm_settings:
  telemetry: True
  success_callback: ["cloudwatch"]
  cloudwatch_callback_params:
    log_group_name: /litellm
    aws_region: eu-central-1

@mfittko mfittko self-assigned this May 19, 2025
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove again

@mfittko mfittko changed the title Add CloudWatch & Assistants API Logging Support Add CloudWatch Logging Support Sep 22, 2025
…onfiguration updates. Fixed test initialization issues and ensured all tests pass. Updated documentation to reflect changes in logging functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants