mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* fix(otel): keep the prompt and reply off the Langfuse root observation when message logging is redacted * fix(otel): honor the otel callback's own message logging settings on the Langfuse root observation * fix(otel): honor mask_input and mask_output on the Langfuse root observation and generation, and leave other loggers' roots alone The OTel v2 Langfuse integration ignored the mask_input and mask_output request flags (body metadata or the langfuse_mask_* headers), so Langfuse showed the prompt and reply on both the root observation and the generation. Each masked side is now written as redacted-by-litellm on both, matching the older langfuse callback. The Langfuse logger also stamped its root input and output on a request root another OTel v2 logger started, so with callbacks ["otel", "langfuse_otel"] the otel callback's own message_logging: false was bypassed. The stamp now needs the root to come from this logger's own tracer provider. * fix(otel): keep masked content off Langfuse entirely and let any source turn a mask on The Langfuse export view now drops the raw gen_ai and other vendor copies of an input or output whose Langfuse observation is masked, so a masked request sends no prompt or reply text to Langfuse. Other exporters keep them, since plain OpenTelemetry does not read the Langfuse mask flags. A mask is on when the body, an admin default, or a langfuse_mask_* header turns it on, so a header set to false can no longer unmask it. A masked stream no longer buffers its chunks for the root output. * fix(otel): keep logging fields an admin excluded off the Langfuse root observation With standard_logging_payload_excluded_fields set to messages or response, the generation already dropped them but the root observation still carried the raw prompt and reply. The root now leaves out its input when messages is excluded and its output when response is excluded * fix(otel): keep a masked Langfuse observation on a span at its attribute limit When a key or team sends to Langfuse and the proxy's own logger does not map Langfuse, the Langfuse fields written for that destination shed first once a span reaches its attribute limit. The masked input and output went with them, so the Langfuse view no longer knew to drop the raw gen_ai copies and sent them on. A masked observation now stays on the span, so a masked prompt or response never reaches Langfuse raw however full the span is * fix(otel): stamp the Langfuse root another logger started when that logger logs content, and carry masks to Langfuse without attribute slots * fix(otel): keep a masked call masked on the operator's own Langfuse export at its attribute limit * test(otel): annotate the new single-assignment test variables as Final |
||
|---|---|---|
| .. | ||
| __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_named_trace.py | ||
| test_otel_v2_presets.py | ||
| test_otel_v2_sources_of_truth.py | ||
| test_otel_v2_vendor_mappers.py | ||
| test_runtime.py | ||