Add labels
You can add labels (like team:andriod
or service:myservice
) to dashboards and alerts, making it
easier to find dashboards and alerts using labels you care about
and discover related dashboards ones use the same labels.
To add a label:
-
Click Add labels.
-
Start typing to add a
key:value
pair.
Autocomplete helps you find and select labels that have already been created.Although you can enter just a value, best practice is to use key:value pairs for easier maintenance and governance.
-
Click out of the field to apply the label.
Labels are displayed on the dashboard or alert and in the list view. You can search for dashboards or alerts by label using the search box
For alerts, labels appear in the payload sent to your notification destination.
You can also add labels from
the list view by clicking the information icon to open the side bar.
Syntax requirements
- Keys must start with a lowercase letter
- Keys and values must be UTF-8
- After the first letter, keys and values can contain
- lowercase letters
- numeric characters
- underscores
- colons (words before the first colon are always considered the
key
) - dashes
- international characters
- emojis
- A key can contain 1-128 characters
- A value can contain 1-255 characters
- A dashboard can contain up to 40 labels
Best practices
Keep these best practices in mind when creating labels for your projects:
- We recommend using key:value pairs. Using only keys can lead to inconsistencies and may not provide enough information.
- Be consistent with label language and syntax across your organization to avoid label noise and confusion. For example, avoid using both
environment:prod
andenv:prod
when they mean the same thing. - Start by creating labels you know you’ll definitely use on other dashboards or alerts. Unused labels create noise and may add confusion.
- Use short labels. They’re easier to parse.
- Use keys and values that are human-readable.