MLflow currently supports associating traces with metadata such as mlflow.trace.user and mlflow.trace.session. Adding cost aggregation and visualization by these metadata fields would provide better insights into resource usage and cost attribution.
<!-- issue-warning --> > [!WARNING] > Before submitting a PR, please make sure that: > - A maintainer has triaged this issue and applied the `ready` label > - This issue has no assignee > - No duplicate PR exists > > PRs not meeting these requirements may be automatically closed. ### Willingness to contribute Yes. I can contribute this feature independently. ### Proposal Summary MLflow currently supports associating traces with metadata such as `mlflow.trace.user` and `mlflow.trace.session`. However, MLflow does not yet provide built-in aggregation and visualization of cost by these, and potentially other, metadata fields. This proposal adds native support for cost aggregation by trace metadata dimensions, enabling users to analyze cost by: session, user, agent (see #21586) or other metadata fields. The feature should include UI support for viewing aggregated costs grouped by these fields, similar to how MLflow currently displays aggregated trace-level costs. ### Motivation > ###