Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/copilot/track-spending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion content/actions/reference/security/secure-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ For additional examples and guidance on the risks of untrusted code checkout, se

### Good practices


* Avoid using the `pull_request_target` workflow trigger if it's not necessary. For privilege separation between workflows, `workflow_run` is a better trigger. Only use these workflow triggers when the workflow actually needs the privileged context.

* Avoid using the `pull_request_target` and `workflow_run` workflow triggers with untrusted pull requests or code content. Workflows that use these triggers must not explicitly check out untrusted code, including from pull request forks or from repositories that are not under your control. Workflows triggered on `workflow_run` should treat artifacts uploaded from other workflows with caution.
Expand Down
39 changes: 31 additions & 8 deletions content/billing/how-tos/products/view-productlicense-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The options available to you vary according to your role and {% data variables.p

## Exploring usage data in more detail

You can also explore usage data in more detail in the **{% octicon "graph" aria-label="chart" aria-hidden="true" %} Usage** view.
You can also explore usage data for all metered products in more detail in the **Usage** or **Metered usage** view.

* **Filter data on the page**: click in the text box to see a list of available filters.
* **Group data**: options in the "Group" option vary based on the filters you define.
Expand All @@ -91,22 +91,45 @@ The metered usage chart and usage break down table both show your current choice
> For GitHub Actions, you can also view the billable job execution minutes for an individual workflow run. For more information, see [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/viewing-job-execution-time).
{% endif %}

## Analyzing use of premium requests

{% data reusables.billing.premium-request-analytics-start %}

If you use premium requests, an additional **Premium request analytics** view is listed under **Usage**. You can use this view to dig deeper into how you are using included requests and where you are being billed for additional requests. For example:

* What's our total usage of premiums requests across all products?
* Are users making good use of the premium requests included in their license for {% data variables.product.prodname_copilot_short %}?
* Which users have consumed more than their monthly quota?
* How widespread is adoption in the organizations where we rolled out {% data variables.product.prodname_copilot_short %}?

As you change the filter, "Timeframe", and "Group by", and options, all areas of the page are updated to reflect your choices. The chart shows the top 5 consumers and combines any other consumers into "All other".

![Screenshot of the premium request analytics chart, "Usage grouped by organization", and table. A "Show Usage Breakdown" arrow is outlined.](/assets/images/help/billing/premium-request-analytics-chart.png)

To show more detailed information for the top 100 users or organizations consuming premium requests, use the {% octicon "chevron-right" aria-label="Show Usage Breakdown" aria-hidden="true" %} shown at the start of each row to expand and collapse data.

![Screenshot of the premium request analytics table, "Usage breakdown" with the first row expanded to show a full breakdown of requests.](/assets/images/help/billing/premium-request-analytics-org-table.png)

## Downloading usage reports

You can download two different types of usage report from the "Usage" page.
Visit the "Metered Usage" page to access a metered billing report for all products, or navigate to the "Premium request analytics" page for a specialized report tailored for Premium request activity tracking.

### General usage reports

1. At the top of the "Usage" page, click **Get usage report**.
1. Choose the report that you want to download.
1. At the top of the page, click **Get usage report**.
1. If prompted, specify the report details:
* Metered usage page: in the dialog displayed, define details of the report that you want to download and click **Email me the report**.
* Premium request analytics page: the report will contain usage for the last 45 days.

When the report is ready for you to download, you'll receive a message to your primary email account with a link to download the report. The link will expire after 24 hours.

For details of the fields included in the report, see [AUTOTITLE](/billing/reference/usage-reports).
For details of the fields included in the reports, see [AUTOTITLE](/billing/reference/billing-reports).

### Downloading the data plotted in the usage chart
### Downloading the data plotted in the chart

When the chart on the "Usage" page shows the data you want to download, click the {% octicon "kebab-horizontal" aria-label="Chart options" aria-hidden="true" %} "Chart options" button and select your preferred format.
When the chart on the "Usage" or "Premium request analytics" page shows the data you want to download, click the {% octicon "kebab-horizontal" aria-label="Chart options" aria-hidden="true" %} "Chart options" button and select your preferred format.

![Screenshot of the metered usage chart on the "Usage" page with the "Chart options" outlined in dark orange.](/assets/images/help/billing/overview-chart-download-button.png)
![Screenshot of the usage chart on the "Premium request analytics" page with "Chart options" open and outlined in dark orange.](/assets/images/help/billing/premium-request-analytics-chart-download.png)

## Next steps

Expand Down
95 changes: 95 additions & 0 deletions content/billing/reference/billing-reports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: Billing reports reference
shortTitle: Billing reports
intro: 'Billing reports show detailed {% data variables.product.github %} usage, premium request usage, and billing information for your account.'
versions:
fpt: '*'
ghec: '*'
ghes: '*'
topics:
- Billing
- Enterprise
- Team
permissions: '{% data reusables.permissions.enhanced-billing-enterprise %}'
redirect_from:
- /billing/managing-your-billing/about-usage-reports
- /billing/reference/usage-reports
contentType: reference
---

The usage reports show detailed information about your account’s {% data variables.product.github %} usage, including how much of each SKU was used and the resulting billable amount.

To generate a usage report, see [AUTOTITLE](/billing/how-tos/products/view-productlicense-use).

## Report types

There are three different types of reports.

* Metered usage page:
* **Summarized metered usage reports**: A summary of usage for all paid products for a maximum period of one year.
* **Detailed metered usage reports**: A detailed usage report for all paid products for a maximum period of 31 days.
* Premium request analytics page:
* **Premium request analytics usage reports**: A detailed, user-based report on usage of premium requests for the last 45 days.

### Summarized metered usage reports

This report sums the `quantity`, `gross_amount`, `discount_amount`, and `net_amount` fields based on the combination of the following values: `date`, `sku`, `repository`, `cost_center_name`. If the usage report is for an enterprise with organizations, the amounts will be summarized by the organization value as well.

### Detailed metered usage reports

The detailed usage report includes the same fields as the summarized report and adds `username` and `workflow_path`.

This report sums the `quantity`, `gross_amount`, `discount_amount`, and `net_amount` fields based on the combination of the following values: `date`, `sku`, `organization`, `repository`, `cost_center_name`, `username`, `workflow_path`.

### Premium request analytics usage reports

This report includes each recorded use of a premium request and includes the following fields: `Timestamp`,`User`,`Model`,`Requests Used`,`Exceeds Monthly Quota`, and `Total Monthly Quota`.

## Metered usage report fields

The usage report contains the following fields.

| Field | Description |
|---------------------------|-------------|
| `date` | The day that the usage occurred. All usage is logged in UTC. |
| `product` | The {% data variables.product.github %} product that was used. |
| `sku` | The specific {% data variables.product.github %} product SKU that was used. |
| `quantity` | The amount of the SKU that was used. |
| `unit_type` | The unit of measurement for the product SKU. |
| `applied_cost_per_quantity` | The unit cost of the product SKU. |
| `gross_amount` | The amount of the product SKU that was used. |
| `discount_amount` | The amount of usage that was discounted. Usage that is discounted as part of your account’s included usage is reflected in this field. Also includes discounts for {% data variables.product.prodname_actions %} usage for standard {% data variables.product.github %}-hosted runners in public repositories and for self-hosted runners. |
| `net_amount` | The billable amount of usage after applying the `discount_amount`. This is the amount that your account will be billed. `gross_amount - discount_amount = net_amount`. |
| `username` | The user associated with the usage, if applicable. Only available in the detailed report. |
| `organization` | The organization associated with the usage, if applicable. |
| `repository` | The repository associated with the usage, if applicable. |
| `workflow_path` | The path of the {% data variables.product.prodname_actions %} workflow that generated the usage, if applicable. Only available in the detailed report. |
| `cost_center_name` | The cost center associated with the usage, if applicable. |

### Metered usage report fields that are closing down

{% data variables.product.github %} aims to minimize changes to the usage report structure, however at times the report structure or fields may change.

| Closing down | Replacement |
|--------------------|---------------------|
| `usage_at` | Refer to `date` instead. |
| `workflow_name` | Refer to `workflow_path` instead. |

## Premium request analytics usage report fields

{% data reusables.billing.premium-request-analytics-start %}

The premium request analytics report contains the following fields.

| Field | Description |
|---------------------------|-------------|
| Timestamp | The full UTC date and time in ISO 18601 format. |
| User | The {% data variables.product.github %} handle of the user associated with the usage. |
| Model | The model used. This might be an LLM like `claude-sonnet-4`, or a product-specific model like `Code Review model`.
| Requests Used | The total number of requests used. |
| Exceeds Monthly Quota | This field indicates whether the premium request will be billed separately:<br>- `FALSE`: The request is covered by the monthly quota included in the user's plan.<br>- `TRUE`: The request exceeds the monthly quota and will be billed |
| Total Monthly Quota | This field records the total number of requests included in the user's current plan{% ifversion fpt or ghec %}, see [AUTOTITLE](/copilot/concepts/billing/individual-plans) and [AUTOTITLE](/copilot/concepts/billing/organizations-and-enterprises){% endif %}. |

## Receiving the report

Usage reports are sent via email to the default email address associated with your {% data variables.product.github %} account. You can only request one usage report per account at a time.
3 changes: 1 addition & 2 deletions content/billing/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ topics:
children:
- /product-usage-included
- /actions-minute-multipliers
- /usage-reports
- /billing-reports
- /supported-payment-methods
- /azure-subscription
- /billing-roles
Expand All @@ -23,4 +23,3 @@ children:
- /enterprise-license-troubleshooting
contentType: reference
---

72 changes: 0 additions & 72 deletions content/billing/reference/usage-reports.md

This file was deleted.

Loading
Loading