mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +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> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_db_endpoint.py | ||
| test_langfuse_logger.py | ||
| test_otel_v2_baggage.py | ||
| test_otel_v2_components.py | ||
| test_otel_v2_config_baggage_parenting_guardrails.py | ||
| test_otel_v2_destinations.py | ||
| test_otel_v2_dynamic.py | ||
| test_otel_v2_emitter.py | ||
| test_otel_v2_logger.py | ||
| test_otel_v2_metrics.py | ||
| test_otel_v2_mount.py | ||
| test_otel_v2_multibackend.py | ||
| test_otel_v2_presets.py | ||
| test_otel_v2_sources_of_truth.py | ||
| test_otel_v2_vendor_mappers.py | ||
| test_runtime.py | ||