Grafana Cloud

Set up cost attribution

Configure cost attribution to allocate your Grafana Cloud usage costs across teams, services, departments, or systems. This setup process involves selecting appropriate labels from your telemetry data and configuring them for cost allocation.

Before you begin

You must have the permissions granted by the Cost attribution admin role.

Configure attribution labels

Cost attribution relies on existing labels on your telemetry. Unlabeled or improperly labeled data can’t be correctly attributed. The labels you select for attributing costs depend on your specific use case and the labeling conventions.

To configure the labels you’d like to use for cost attribution, you must first create an attribution label in your Grafana Cloud stack.

Note

The Cost Management and Billing App will be available either in the top level navigation of your Grafana instance, or under More apps.

Configure a Telemetry attribution label

To configure Telemetry cost attribution labels, complete the following steps:

  1. Sign in to your Grafana Cloud instance.

  2. Navigate to Cost Management and Billing.

  3. Click the Settings tab in the top navigation menu.

  4. In the Set up your Attribution labels section, click +Select another attribution label next to Telemetry attribution.

  5. Click the drop-down menu for 1. Select Metrics Key.

  6. Choose your primary attribution label key from the list of suggested labels, such as team, service, or environment.

    The Logs Key (suggested) and Traces Key (suggested) fields are automatically populated with matching keys based on your metrics key selection. You can choose to override these if needed.

  7. In the Label Name field, customize the auto-filled name based on your metrics key if desired.

  8. Click Save Primary Label.

  9. Optional: To add a secondary attribution label for more granular tracking, click +Select another attribution label next to Telemetry attribution and repeat the process.

You should try to pick a label key that’s applied to the majority of your telemetry data. For example, if the label you choose is only applied to 2% of your telemetry, 98% of your usage and spend is classified as unattributed, which means the system doesn’t know the source of that telemetry because it was missing the specified labels.

Configure a Performance attribution label

Before you configure a Performance attribution label, you must create a label in the Performance testing app and assign it to a project. Refer to Manage labels and cost attribution for details.

To configure Performance cost attribution labels, complete the following steps:

  1. Sign in to your Grafana Cloud instance.
  2. Navigate to Cost Management and Billing.
  3. Click the Settings tab in the top navigation menu.
  4. In the Set up your Attribution labels section, click +Select another attribution label next to Performance attribution.
  5. In the Enter your k6 label field, enter the name of the label you created in the Performance testing app.
  6. Click Save k6 Label.
  7. Optional: To add a secondary attribution label for more granular tracking, click +Select another attribution label next to Performance attribution and repeat the process.

Label requirements

When selecting labels for cost attribution, consider the following requirements:

  • Maximum labels: You can configure up to 2 labels for cost attribution
  • Cardinality limit: The combined cardinality of both labels cannot exceed 1,000 unique combinations
  • Coverage: Choose labels that are applied to the majority of your telemetry data to minimize unattributed costs

Prohibited labels

Certain label keys can’t be used for cost attribution because they conflict with internal Grafana Cloud labels:

Label Key
id
monetary
org_id
stack_id
instance
job
tenant
mimir_namespace
loki_namespace
loki_cluster
reason
tracker
retention_hours
starting with __ (double underscore)

Important considerations

Data availability timing

  • Cost attribution begins collecting data only from the moment it’s enabled
  • Historical data cannot be regenerated
  • If you enable cost attribution partway through a month, the reported costs only reflect data from that point forward

Attribution accuracy

  • Telemetry data without the configured attribution labels is classified as unattributed
  • If your chosen labels are only applied to a small percentage of your telemetry, most usage appears as unattributed
  • Review your labeling strategy to ensure consistent application of attribution labels across your telemetry

Stack-level configuration

  • Cost attribution is configured and computed on a per-stack basis, not per-organization
  • Each stack requires separate configuration if you have multiple stacks
  • Attribution data is specific to the stack where you view it

Next steps

After configuring cost attribution: