---
title: "Control labels at the source | Grafana Labs"
description: "Filter series with relabeling rules and enforce policy at a gateway"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

## Filter at the source

You can keep unnecessary series from ever leaving your infrastructure with **relabeling** rules in Prometheus, Alloy, or your collector.

- **Allowlisting**: keep an explicit set of important metrics and labels and drop everything else. For example, for Prometheus metrics, use `keep` and `labelkeep` actions.
- **Denylisting**: drop an explicit set of high-cardinality metrics and labels and keep everything else. For example, for Prometheus metrics, use `drop` and `labeldrop` actions.

For the full relabeling reference and examples, refer to [Reduce metrics costs by filtering collected and forwarded metrics](/docs/grafana-cloud/cost-management-and-billing/analyze-costs/reduce-costs/metrics-costs/client-side-filtering/).

## Enforce your strategy at a gateway

Relabeling rules only help if you control the collectors that apply them. In larger organizations, many teams send telemetry, and the team that pays the bill often can’t control every client. In that case, route telemetry through a tier of **gateway collectors** that your platform or admin team owns, and apply your labeling and filtering policies at that layer. Whatever upstream teams send, your rules run at the gateway before data reaches Grafana Cloud.

[**Fleet Management**](/docs/grafana-cloud/send-data/fleet-management/) helps you run this pattern at scale by giving you centralized control over your collector configurations, so you can roll out and update gateway policies from one place instead of editing collectors one by one.
