github / github/app

[Feature Request] Add custom session tags for cost attribution in the Copilot consumption overview

未关闭
#1,229 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement feature-request
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

### Feature summary

Allow sessions to be tagged with custom labels (e.g. project, ticket, feature) so that those tags appear as a dimension in the Copilot consumption / cost breakdown.

### What problem are you trying to solve?

Our team works on many projects, features, and tickets in parallel. The consumption overview already breaks down cost by model, user, and day, which is useful, **but none of those dimensions map to what we were actually working on.**

**Today we can't tell which ticket or feature was cheap and which was expensive, so we can't attribute Copilot spend back to the work that drove it**. This matters for internal cost reporting and for deciding where Copilot usage pays off. Maybe this can even be used to invoice spent tokens to our customers.

### Proposed solution

Add the ability to attach one or more custom tags to a session, surfaced as a filter/grouping in the existing consumption overview.
Specifically:

- **Manual tagging per session**: set a tag (or tags) when starting or during a session, e.g. project-A, ticket#1234, feature-xyz.
- **Project-level default tag**: a project setting where a tag like project-A is automatically applied to every session in that project, so per-ticket tagging is the only manual step.
- **Multiple tags per session**: a single session can carry several tags at once (e.g. project-A + ticket#1234), since one piece of work usually belongs to more than one category.

**Where it should appear**: In the existing consumption overview, as an additional breakdown/filter dimension alongside model, user, and day.

Example: A developer working on ticket#1234 in Project A would have sessions automatically tagged project-A (project default) and could add ticket#1234 manually. The consumption overview would then let us filter or group by tag to see total tokens/cost for that ticket or for Project A as a whole.

**Why it matters**: This turns the consumption data into something teams can act on. Attributing spend to real work, comparing cost across tickets/features, and justifying or right-sizing Copilot usage per project.

This is probably something that the underlying Copilot SDK can't do right now, but I hope that is as easy as "adding attributes to a session" 😅 Even if the cost breakdown is not possible, adding tags would be a necessary first step.

### Workflow impact

_No response_

### Installation context

_No response_

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

首先定位现有的 Copilot 使用量概览,以及可以携带元数据的会话模型或入口点。检查底层的 Copilot SDK 是否支持会话属性,然后追踪模型、用户和日期维度如何传递到概览中。完成标准是会话可以携带一个或多个手动标签或项目默认标签,并且概览可以按这些标签筛选或分组成本,同时解决或记录 SDK 的限制。

由索引模型根据 Issue 内容生成。

评估

领域
analytics
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。