mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-04 01:48:57 +00:00
* wip * wip * test(traces): separate root status from diagnostic error counts * test(traces): cover normalization precedence and fallbacks * chore(cache): remove stray comments from trace PR * test(traces): name lens test for shared query path * fix(traces): place query implementation before test module * test(traces): use unified read scope in migration tests * ci(rust): allow feature checks to finish * ci(mcp): allow dependency resolution to finish * fix(traces): preserve key visibility and safe spend attribution
8 lines
429 B
SQL
8 lines
429 B
SQL
SELECT
|
|
EXISTS(SELECT 1 FROM otel_traces
|
|
WHERE ({all_teams:UInt8}=1 OR TeamId={team:String})
|
|
AND ({key_hash:String}='' OR ApiKeyHash={key_hash:String})) AS traces,
|
|
EXISTS(SELECT 1 FROM spend_logs
|
|
WHERE ({all_teams:UInt8}=1 OR team_id={team:String})
|
|
AND ({key_hash:String}='' OR api_key={key_hash:String})
|
|
AND NOT JSONExtractBool(metadata,'litellm_lens_internal')) AS requests
|