79307638

Date: 2024-12-25 13:23:00
Score: 0.5
Natty:
Report link

These are many enterprises require for tracking GitHub Copilot generated code, in the situation that you are in the enterprise registered GitHub Copilot for Business or Enterprise, you will have few APIs to cover in the organization/team level, not for individual because it is privacy issue.

Metrics API: https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28

- date
- total_active_users
- total_engaged_users
- copilot_ide_code_completions
  - total_engaged_users
  - languages
    - name
    - total_engaged_users
  - editors
    - name
    - total_engaged_users
    - models
      - name
      - is_custom_model
      - custom_model_training_date
      - total_engaged_users
      - languages
        - name
        - total_engaged_users
        - total_code_suggestions
        - total_code_acceptances
        - total_code_lines_suggested
        - total_code_lines_accepted
- copilot_ide_chat
  - total_engaged_users
  - editors
    - name
    - total_engaged_users
    - models
      - name
      - is_custom_model
      - custom_model_training_date
      - total_engaged_users
      - total_chats
      - total_chat_insertion_events
      - total_chat_copy_events
- copilot_dotcom_chat
  - total_engaged_users
  - models
    - name
    - is_custom_model
    - custom_model_training_date
    - total_engaged_users
    - total_chats
- copilot_dotcom_pull_requests
  - total_engaged_users
  - repositories
    - name
    - total_engaged_users
    - models
      - name
      - is_custom_model
      - custom_model_training_date
      - total_pr_summaries_created
      - total_engaged_users

Usage API: https://docs.github.com/en/rest/copilot/copilot-usage?apiVersion=2022-11-28

- day
- total_suggestions_count
- total_acceptances_count
- total_lines_suggested
- total_lines_accepted
- total_active_users
- total_chat_acceptances
- total_chat_turns
- total_active_chat_users
- breakdown
  - language
  - editor
  - suggestions_count
  - acceptances_count
  - lines_suggested
  - lines_accepted
  - active_users

For Metrics API, it has repository metrics tracked but only for PR summaries, not for every code generated in the IDE/Editor side. If you would like to looking at more details, you may need to build a forward proxy, where nginx can do TLS Inspection of tracking any package sent through client and GitHub API, as well as any telemetry of VSCode when you are coding for a workspace associated with repository...

To playground before doing that you can take a look at Fiddler to develop any https body part to be tracked, I have my similar answer here you can try with Fiddler initially Why Github Copilot network request not appeared in Visual Studio Code Developer Tools?

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: Alfred Luu