Documentationbreadcrumb arrow Learning pathsbreadcrumb arrow Design a labeling strategy

Open in Grafana Cloud

Complete this learning path directly in your Grafana Cloud stack, or in the Grafana Play stack, with an interactive learning experience.

Design a labeling strategy to control cardinality

Welcome to the Grafana Cloud learning path that teaches you how to design a labeling strategy that keeps cardinality, cost, and query performance under control.

Every label you attach to a metric or log multiplies the number of unique series or streams you generate. Most billing surprises in Grafana Cloud trace back to labeling decisions made at instrumentation time, often by accepting defaults without realizing their cost impact. This path teaches you the math behind cardinality, how to inspect your own cardinality, and how to choose labels deliberately for metrics and logs.

Here’s what to expect

When you complete this path, you’ll be able to:

  • Explain how label combinations multiply into unique active series and log streams
  • Inspect your own cardinality with the Cardinality tab in the Cost Management and Billing app
  • Choose metric labels deliberately and avoid unbounded values
  • Reduce existing metrics cardinality with relabeling and Adaptive Metrics
  • Decide when log data belongs in a label, in structured metadata, or in the log line
  • Move high-cardinality context to the right signal instead of deleting it
  • Link a metric spike to the exact trace with exemplars, without adding labels

Before you begin

Before you design your labeling strategy, ensure that you have:

  • A Grafana Cloud account. To create an account, refer to Grafana Cloud. A stack that’s already receiving metrics and logs shows richer data in the interactive milestones.
  • The permissions granted by the Billing and usage reader role, including cardinality read access. Refer to Manage access to the Cost Management and Billing app.
  • Basic familiarity with metrics and logs concepts.

Troubleshooting

If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.

More to explore

We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.

Are you ready?