{"resourceId":"mlflow-issue-27356-agent-span-cost-rollup-undercount-20261030","versions":[{"version":"external-f8b48888aab256be2a8c83b2c8e25bcdee490d718108e076ea70a994c380d45a","resource":{"id":"mlflow-issue-27356-agent-span-cost-rollup-undercount-20261030","title":"MLflow issue #27356 reproduces agent-trace cost errors (89% low in one case) when invoke_agent rollup spans are priced","organization":"MLflow open source project (issue filed by an independent GitHub user)","sector":"Open source agent observability tooling","geography":"Global (open source project)","publishedAt":"2026-10-30 (issue opened; GitHub createdAt 2026-10-30T21:59:56Z, 4:59 PM CT); closed as completed with a linked merged pull request","publicationDate":"2026-10-30","eventDate":null,"sourceName":"GitHub mlflow/mlflow issue tracker","sourceLabel":"Independent technical bug report","sourceUrl":"https://github.com/mlflow/mlflow/issues/27356","evidenceClass":"independent-research","outcomeClass":"cautionary","topics":["developers-agents","governance-procurement","operating-model"],"finding":"The reporter shows that on MLflow 3.17.2 with a SQL tracking store, cost is computed for every span with token usage and a model, including OpenTelemetry GenAI invoke_agent spans that carry rolled-up usage. Trace cost then comes from the topmost costed span and skips the LLM calls under it. In a Strands orchestrator/sub-agent reproduction the trace cost was 89% low, while the token total was correct. In OTLP reproductions trace cost was off by -59% and +215%, depending on whether cache tokens were included in the rollup. The issue was labelled 'triage: reproduced' and the page metadata shows it closed as completed with a merged closing pull request.","sledRelevance":"This is the failure mode Red Hat's 24 Nov IdeaBot post designs around. It is why now: anyone using MLflow cost figures for agency chargeback or AI budget reporting should confirm the MLflow version and span shape before trusting trace-level costs.","evidence":"Issue page opened. It gives the environment (MLflow 3.17.2 client and server, SQLite backend, macOS), reproduction code, per-span costs and expected versus actual totals. The fix PR's contents and the MLflow release that includes it were not verified.","architectureImplications":"Cost aggregation must count only inference (LLM-call) spans. Agent-level spans with rolled-up usage should not be priced. The source points to an OpenTelemetry GenAI semconv change that moved cache attributes off invoke_agent spans on purpose.","governanceImplications":"Trace-level cost from observability tools should not be used for chargeback or budget reporting without reconciliation, and version pinning should be recorded.","securityPrivacyImplications":"No direct security impact is described. The integrity of cost and usage audit data is the main concern.","caveats":"A single reporter's reproductions using fake models with fixed token usage and hand-built OTLP spans. The reporter's affiliation is not stated. Not peer reviewed. Published before the last run (30 Oct) and included because the 24 Nov Red Hat post makes it newly relevant. Fixed-release version not confirmed.","streamIds":["red-hat"],"roles":{"sales":"Sales framing: this is independent evidence that agent cost dashboards can be wrong. It supports a careful conversation: before an agency uses AI cost reports for chargeback, it should validate them. Pair it with Red Hat's IdeaBot post as a design reference, while making clear that Red Hat did not write this issue. Do not suggest the customer's current tooling is affected without checking their versions, and do not cite the 89% figure as typical. It comes from one constructed reproduction.","engineering":"Engineering framing: price only LLM-call spans. Check whether the customer's MLflow version and tracing backend price invoke_agent spans that carry rolled-up usage, and test with a seeded orchestrator/sub-agent trace whose call-level costs are known. Confirm which MLflow release contains the merged fix before recommending an upgrade. If OpenTelemetry GenAI instrumentation feeds the store, check the span shapes against the semantic conventions, which moved cache attributes off agent spans.","delivery":"Delivery framing: add cost-total regression tests to the observability runbook. Keep a fixed test trace with known per-call costs and run it after every MLflow or instrumentation upgrade. Record the MLflow version used for any cost report shared with finance. Where reports feed chargeback, reconcile them against provider invoices until the tests have passed consistently."},"roleDetails":{"sales":{"customerProblem":"AI cost dashboards built on agent traces can misstate spend when agent rollup spans are priced.","stakeholders":["AI program owner","Finance/chargeback office","Observability or platform engineering lead"],"discoveryQuestions":["Which tool produces your AI cost reports, and which version?","Are those reports used for chargeback or budget decisions?","Have totals ever been reconciled against provider invoices?"],"valueHypothesis":"Validating cost telemetry before it is used could prevent chargeback disputes caused by misattributed agent spend.","potentialEngagement":"A bounded cost-telemetry validation using a seeded test trace for one agent application.","unsupportedClaims":["That the customer's tooling has this bug","That the 89% error is typical","That a specific MLflow release fixes it (not verified)"]},"engineering":{"fit":"Relevant to teams using MLflow Tracing with SQL tracking stores or OTLP ingestion for agent workloads.","architectureIntegration":"Cost aggregation over OpenTelemetry GenAI spans should count inference spans only.","prerequisites":["Known MLflow client and server versions","A reproducible test trace with known call costs","Access to the tracking backend"],"constraints":["Reproductions used fake models and hand-built spans","The fixed release was not confirmed","Behaviour depends on instrumentation span shape"],"security":"No direct security vulnerability; the issue is the integrity of cost and usage records.","proofOfValue":["Seeded orchestrator/sub-agent trace totals match the sum of LLM-call costs","Cache-token cases priced correctly","Regression test passes after upgrade"]},"delivery":{"work":"Add a cost-total regression test and version tracking to the agent observability runbook.","dependencies":["A test environment with the customer's MLflow version","Pricing table for the test models","Finance agreement on the reconciliation tolerance"],"ownership":"Observability/platform engineering team.","skillsAdoption":"Engineers learn to read span hierarchies and to spot rollup versus leaf usage.","governanceCheckpoints":["Version recorded on every cost report","Regression test passed before any upgrade reaches production","Invoice reconciliation before chargeback use"],"acceptanceCriteria":["Proposed: seeded trace cost equals the expected per-call sum","Proposed: test runs automatically on each upgrade","Proposed: reconciliation variance within an agreed tolerance"],"risks":["Silent cost misstatement after upgrades","Relying on an unverified fix version","Instrumentation changes altering span shapes"]}},"retrievedAt":"2026-11-24T22:33:38-06:00","enrichedAt":"2026-11-24T22:41:53-06:00","enrichmentBasis":"retrieved source","accessibilityWorkforceImplications":"Engineers need to understand span hierarchies to spot misattributed costs, which is specialist observability knowledge.","procurementImplications":"Agencies buying agent observability or relying on vendor dashboards can ask how agent rollup spans are handled in cost totals.","operatingModelImplications":"Upgrades to observability tooling should include regression checks on cost totals, not just on functionality.","sourceVerification":{"openedUrl":"https://github.com/mlflow/mlflow/issues/27356","referenceExcerpt":"The researcher's gpt-4o call ($0.07) sits under the orchestrator span and is skipped, so the trace cost is 89% low.","promptVersion":"sled-research-v4.0","model":null,"basis":"agent-reported inspection"}}}]}