github / github/app

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

Đang mở
#1,229 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement feature-request
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần tổng quan hiện có về mức tiêu thụ Copilot và mô hình phiên hoặc điểm vào có thể mang siêu dữ liệu. Kiểm tra xem Copilot SDK bên dưới có hỗ trợ các thuộc tính phiên hay không, sau đó theo dõi cách các chiều mô hình, người dùng và ngày được truyền đến phần tổng quan. Hoàn thành khi các phiên có thể mang một hoặc nhiều thẻ thủ công hoặc thẻ mặc định của dự án, và phần tổng quan có thể lọc hoặc nhóm chi phí theo các thẻ đó, với giới hạn của SDK được giải quyết hoặc ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
analytics
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.