Krish Dholakia
3f5c8ae000
Add aggregate spend by tag ( #10071 )
...
* feat: initial commit adding daily tag spend table to db
* feat(db_spend_update_writer.py): correctly log tag spend transactions
* build(schema.prisma): add new tag table to root
* build: add new migration file
2025-04-16 12:26:21 -07:00
Ishaan Jaff
3aed97e63e
[Feat - Cost Tracking improvement] Track prompt caching metrics in DailyUserSpendTransactions ( #10029 )
...
* stash changes
* emit cache read/write tokens to daily spend update
* emit cache read/write tokens on daily activity
* update types.ts
* docs prompt caching
* undo ui change
* fix activity metrics
* fix prompt caching metrics
* fix typed dict fields
* fix get_aggregated_daily_spend_update_transactions
* fix aggregating cache tokens
* test_cache_token_fields_aggregation
* daily_transaction
* add cache_creation_input_tokens and cache_read_input_tokens to LiteLLM_DailyUserSpend
* test_daily_spend_update_queue.py
2025-04-15 21:40:57 -07:00
Krish Dholakia
08053e8f12
Add aggregate team based usage logging ( #10039 )
...
* feat(schema.prisma): initial commit adding aggregate table for team spend
allows team spend to be visible at 1m+ logs
* feat(db_spend_update_writer.py): support logging aggregate team spend
allows usage dashboard to work at 1m+ logs
* feat(litellm-proxy-extras/): add new migration file
* fix(db_spend_update_writer.py): fix return type
* build: bump requirements
* fix: fix ruff error
2025-04-15 20:58:48 -07:00
Ishaan Jaff
4c85e13226
[Feat] Emit Key, Team Budget metrics on a cron job schedule ( #9528 )
...
* _initialize_remaining_budget_metrics
* initialize_budget_metrics_cron_job
* initialize_budget_metrics_cron_job
* initialize_budget_metrics_cron_job
* test_initialize_budget_metrics_cron_job
* LITELLM_PROXY_ADMIN_NAME
* fix code qa checks
* test_initialize_budget_metrics_cron_job
* test_initialize_budget_metrics_cron_job
* pod lock manager allow dynamic cron job ID
* fix pod lock manager
* require cronjobid for PodLockManager
* fix DB_SPEND_UPDATE_JOB_NAME acquire / release lock
* add comment on prometheus logger
* add debug statements for emitting key, team budget metrics
* test_pod_lock_manager.py
* test_initialize_budget_metrics_cron_job
* initialize_budget_metrics_cron_job
* initialize_remaining_budget_metrics
* remove outdated test
2025-04-10 16:59:14 -07:00
Ishaan Jaff
6e88d1e662
Merge branch 'main' into litellm_metrics_pod_lock_manager
2025-04-04 21:11:39 -07:00
Ishaan Jaff
4b314a9aa1
test_queue_flush_limit
2025-04-04 16:29:06 -07:00
Ishaan Jaff
6948b62a3a
test_queue_size_reduction_with_large_volume
2025-04-04 16:21:29 -07:00
Ishaan Jaff
4198d17544
aggregate_queue_updates
2025-04-04 15:54:07 -07:00
Ishaan Jaff
462827c9ec
flush_all_updates_from_in_memory_queue
2025-04-04 15:34:56 -07:00
Ishaan Jaff
87b834585b
add _get_aggregated_spend_update_queue_item
2025-04-04 15:32:27 -07:00
Ishaan Jaff
b42b3bf6c8
add logic for max size in memory queue
2025-04-04 15:31:40 -07:00
Ishaan Jaff
8e80928efd
add MAX_SIZE_IN_MEMORY_QUEUE
2025-04-04 15:31:09 -07:00
Ishaan Jaff
fd4e397da7
prom emit size of DB TX queues for observability
2025-04-02 18:39:29 -07:00
Ishaan Jaff
6a1552ee03
emit lock acquired and released events
2025-04-02 17:40:25 -07:00
Ishaan Jaff
4a70e9ad8b
test pod lock manager
2025-04-02 14:39:40 -07:00
Ishaan Jaff
4e9bdc9e6e
BaseUpdateQueue
2025-04-01 18:31:54 -07:00
Ishaan Jaff
be9e9e6db5
refactor file structure
2025-04-01 18:30:48 -07:00