Documentation Index
Fetch the curated documentation index at: https://grafana_com_website/llms.txt
Fetch the complete documentation index at: https://grafana_com_website/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: /docs/grafana-cloud/testing/k6/projects-and-users/manage-labels.md (append .md) or send Accept: text/markdown to /docs/grafana-cloud/testing/k6/projects-and-users/manage-labels/. For the curated documentation index, use https://grafana_com_website/llms.txt. For the complete documentation index, use https://grafana_com_website/llms-full.txt.
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 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 or the Performance Testing Admin 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, orenvironment. - Keep label values consistent across your organization. For example, use
frontendeverywhere instead of mixingfrontend,Frontend, andFE. - Avoid changing label values frequently, because changes can affect historical usage tracking.
Create a label
To create a label:
- In Grafana Cloud, go to Testing & synthetics > Performance > Settings.
- Under Metadata, click Labels.
- Click New label.
- In the Name field, enter a key for the label.
- Enter a description for the label.
- 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:
- Go to Testing & synthetics > Performance > Settings.
- Under Metadata, click Labels.
- 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:
- Go to Testing & synthetics > Performance > Projects.
- Select the project you want to label.
- Click the menu icon in the upper-right corner of the project page.
- Select Manage labels. The Edit project labels dialog box opens.
- Click Add Label.
- From the Label Name drop-down, select a label.
- In the Label Value field, enter a value for the project.
- 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:
- From the project page, click the menu icon in the upper-right corner.
- Select Manage labels. The Edit project labels dialog box opens.
- Update the label values as needed.
- 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:
- From the project page, click the menu icon in the upper-right corner.
- Select Manage labels. The Edit project labels dialog box opens.
- Click the delete icon next to each label you want to remove.
- 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 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.
Note
Cost attribution for Grafana Cloud k6 tracks
VUHconsumption only. It doesn’t track labels applied to individual k6 metrics.
Was this page helpful?
Related resources from Grafana Labs


