mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* feat(otel): add Mixpanel OpenTelemetry v2 preset callback * fix(otel): address CI type/format checks, credential registry, and 100% coverage * test(proxy): cover Mixpanel destination-setting-only callback validation branch * fix(otel): give Mixpanel the caller's user.id on every span The preset takes over from #48638. Spans after auth now carry the id the caller named, in the proxy's project and in a team's or key's own project, and a request's id never reaches another backend. `metadata["user.id"]` only labels spans, so customer limits and spend logs stay as they are on main. Mixpanel tokens that could never work get a 400 on every writer, and a request with no project token keeps the operator's region. * fix(otel): name one caller on every Mixpanel span and refuse padded masked tokens The id read at auth now replaces a user.id already on the span in Mixpanel's copy, so a value a mapper wrote for another backend no longer splits a request across two callers. A padded masked or "None" project token is refused like the bare value. * fix(ui): give the Mixpanel callback an i18n description key Main moved callback descriptions to locale keys, so the Mixpanel entry's inline description no longer type checks. * test: type the Mixpanel tests and give their import suppressions a reason * fix(otel): accept a blank Mixpanel region and refuse a var-less key entry without OTel v2 A missing, blank or null mixpanel_region already exports to the US endpoint, so saving one no longer returns 400, and the endpoint no longer warns about it. A key logging entry naming mixpanel with no callback_vars now gets the same OTel v2 refusal as one with vars. * test: wrap two long Mixpanel test lines * test(otel): leave the pre-body cached key read out of the Mixpanel id check Main now reads a cached key before the request body to refuse a blocked key. That span ends before auth names the caller, like the auth span's own children, so it carries no id. * Merge the two callback_config_validation imports in team_endpoints * Refuse an unsendable Mixpanel entry sent as a JSON-string metadata.logging on team writes * Annotate new test variables with Final --------- Co-authored-by: Nausherwan Korai <230245508+naushkorai@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| management_v1 | ||
| policy_endpoints | ||
| scim | ||
| search_endpoints | ||
| sso | ||
| usage_endpoints | ||
| __init__.py | ||
| jwt_key_mapping_doubles.py | ||
| test_access_group_endpoints.py | ||
| test_access_group_management.py | ||
| test_activity_tenant_scoping.py | ||
| test_auto_router_endpoints.py | ||
| test_budget_endpoints.py | ||
| test_cache_settings_endpoints.py | ||
| test_callback_management_endpoints.py | ||
| test_common_daily_activity.py | ||
| test_common_utils.py | ||
| test_compliance_endpoints.py | ||
| test_config_override_endpoints.py | ||
| test_coordination_redis_endpoints.py | ||
| test_cost_estimate_endpoint.py | ||
| test_cost_tracking_settings.py | ||
| test_credential_migration.py | ||
| test_customer_budget.py | ||
| test_customer_endpoints.py | ||
| test_daily_activity_routes.py | ||
| test_delete_callbacks_endpoint.py | ||
| test_delete_verification_tokens_failed.py | ||
| test_encryption_endpoints.py | ||
| test_entraid_app_roles.py | ||
| test_gateway_request_endpoints.py | ||
| test_id_jag_assertion_capture.py | ||
| test_internal_user_endpoints.py | ||
| test_jwt_key_mapping.py | ||
| test_key_budget_change.py | ||
| test_key_generate_prisma.py | ||
| test_key_management_endpoints.py | ||
| test_management_route_coverage.py | ||
| test_mcp_connector_import.py | ||
| test_mcp_management_endpoints.py | ||
| test_mcp_servers.py | ||
| test_model_deprecation_alerts.py | ||
| test_model_insights_endpoints.py | ||
| test_model_management_endpoints.py | ||
| test_org_admin_team_access.py | ||
| test_organization_endpoints.py | ||
| test_password_endpoints.py | ||
| test_policy_endpoints.py | ||
| test_project_org_authz.py | ||
| test_prompt_cache_prediction.py | ||
| test_prompt_caching_requests.py | ||
| test_ptu_consumption.py | ||
| test_ptu_model_settings.py | ||
| test_request_error_endpoints.py | ||
| test_roi_calculator_endpoints.py | ||
| test_router_settings_endpoints.py | ||
| test_saml_sso.py | ||
| test_session_endpoints.py | ||
| test_sso_helper_utils.py | ||
| test_subscription_accounts.py | ||
| test_tag_management_endpoints.py | ||
| test_team_admin_field_permissions.py | ||
| test_team_callback_endpoints.py | ||
| test_team_default_params.py | ||
| test_team_endpoints.py | ||
| test_team_model_alias_merge.py | ||
| test_tool_management_endpoints.py | ||
| test_ui_sso.py | ||
| test_user_agent_analytics_endpoints.py | ||
| test_workflow_management_endpoints.py | ||