In this article
Test failed spans just below and above their attribute budget, checking existing diagnostics and usage fields; successful small traces cannot establish failure-boundary completeness.
The November 13 LiteLLM v1.111.0-dev.2 prerelease fixes attribute-capacity handling on failed Langfuse spans. Failure usage fields need space without unnecessarily displacing existing diagnostic attributes. Observability acceptance should approach the configured boundary deliberately: an ordinary short trace can look complete while a larger failed request silently loses the evidence operators need to explain its cost or error.
Populate attributes with recognizable synthetic values
Create a harmless failure callback fixture with a known set of ordinary attributes and known usage fields. Increase metadata until the configured capacity boundary is reached. Compare the retained fields with written priority expectations. Merely counting exported attributes is insufficient: two spans can contain the same number while one loses the request correlation or usage component needed to interpret a failure.
Reserve only fields that still need space
Include usage attributes already present and attributes that will be added by failure handling. The PR reserves pending failure fields rather than charging capacity for duplicates. A conservative-looking reservation can still remove useful existing metadata unnecessarily. Inspect the final exported span after all transformations, not only the intermediate object before the exporter applies its own limits or derived trace fields.
Failure usage and task success remain different
Return a known partial-use amount from a synthetic failed model call. Verify usage survives while the status stays failed and the original error remains identifiable. Retained cost data must not turn a failure into a successful generation. Conversely, a failed status should not imply zero consumption. Compare the spend row and trace for the same request identity without assuming both destinations have identical attribute budgets.
Make attribute policy reviewable
Record configured capacity, retained keys and intentionally omitted derived fields for each boundary case. The release repairs one ordering and reservation path; it does not guarantee every tracing backend stores unlimited metadata. A useful adoption result demonstrates the intended diagnostic priorities under real exporter constraints, while keeping synthetic content and stable request IDs sufficient to explain why a field is absent without assuming the underlying execution never produced it.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.