---
title: "Manage labels and cost attribution | Grafana Cloud documentation"
description: "Use labels to categorize k6 projects and track VUH consumption and costs across teams, departments, or environments."
---

# Manage labels and cost attribution

Labels let you categorize k6 projects by attaching metadata to all test runs in a project, such as team, environment, or department. When you assign labels to projects, [cost attribution](/docs/grafana-cloud/cost-management-and-billing/cost-attributions/) can use them to break down Virtual User Hour (`VUH`) consumption, so you can track testing costs across your organization.

Each label is defined at the stack level, and it includes a key and a description. When you assign a label to a project, you provide a value for that label. For example, a label with the key “environment” might have the value “production” in one project and “staging” in another, so you can track `VUH` consumption per environment, and optimize your tests and spending based on that data.

## Before you begin

- You need the [Grafana Cloud Admin](/docs/grafana-cloud/account-management/authentication-and-permissions/cloud-roles/) or the [Performance Testing Admin](/docs/grafana-cloud/testing/k6/projects-and-users/configure-rbac/) role to create and manage labels.
- There is a limit of 100 label keys per organization.
- Label keys can’t exceed 64 characters.
- You can assign up to 30 labels per project.

## Label naming guidelines

When you create labels, follow these guidelines for consistency:

- Use lowercase, descriptive keys, such as `team`, `department`, or `environment`.
- Keep label values consistent across your organization. For example, use `frontend` everywhere instead of mixing `frontend`, `Frontend`, and `FE`.
- Avoid changing label values frequently, because changes can affect historical usage tracking.

## Create a label

To create a label:

1. In Grafana Cloud, go to **Testing &amp; synthetics** &gt; **Performance** &gt; **Settings**.
2. Under **Metadata**, click **Labels**.
3. Click **New label**.
4. In the **Name** field, enter a key for the label.
5. Enter a description for the label.
6. Click **Submit**.

After you create the label, it appears in the **Labels** table, and you can assign it to projects.

## Edit or delete a label

To edit or delete a label:

1. Go to **Testing &amp; synthetics** &gt; **Performance** &gt; **Settings**.
2. Under **Metadata**, click **Labels**.
3. Find the label you want to modify, then use the edit or delete icons next to it.

> Caution
> 
> Deleting a label removes it from all projects that use it. This doesn’t affect historical usage data, but future test runs in those projects are no longer attributed to the deleted label.

## Assign labels to a project

After you create labels, you can attach them to individual projects.

To assign labels to a project:

1. Go to **Testing &amp; synthetics** &gt; **Performance** &gt; **Projects**.
2. Select the project you want to label.
3. Click the menu icon in the upper-right corner of the project page.
4. Select **Manage labels**. The **Edit project labels** dialog box opens.
5. Click **Add Label**.
6. From the **Label Name** drop-down, select a label.
7. In the **Label Value** field, enter a value for the project.
8. Click **Save**.

All future test runs in this project are attributed to the selected labels. Existing past test runs aren’t retroactively labeled.

## Update labels on a project

To change the labels assigned to a project:

1. From the project page, click the menu icon in the upper-right corner.
2. Select **Manage labels**. The **Edit project labels** dialog box opens.
3. Update the label values as needed.
4. Click **Save**.

Updated labels apply to future test runs only. Past test runs retain the labels that were assigned at the time they ran.

## Remove labels from a project

To remove labels from a project:

1. From the project page, click the menu icon in the upper-right corner.
2. Select **Manage labels**. The **Edit project labels** dialog box opens.
3. Click the delete icon next to each label you want to remove.
4. Click **Save**.

After you remove labels, future test runs in this project are no longer attributed to those labels.

## Use labels for cost attribution

After you assign labels to projects, the [Cost Management and Billing](/docs/grafana-cloud/cost-management-and-billing/) app can use them to attribute `VUH` consumption. This lets you track how much each team, environment, or department spends on performance testing.

To learn more about cost attribution reports, refer to [Set up cost attribution](/docs/grafana-cloud/cost-management-and-billing/generate-usage-attribution-report/).

> Note
> 
> Cost attribution for Grafana Cloud k6 tracks `VUH` consumption only. It doesn’t track labels applied to individual k6 metrics.
