Create and manage drop rules
Drop rules let you control log volume by creating deterministic rules to decide which log lines to drop. You can use drop rules to reduce repetitive or low-value log lines across specific log streams, matching specific text patterns, or with specific log levels, or any combination thereof.
Drop rules are evaluated in priority order. The first rule that a log line matches is what is applied. A log line must meet each of the criteria in the rule to be considered a match.
For more information about how drop rules interact with exemptions and pattern drop rates, refer to Order of evaluation.
Why use drop rules?
Drop rules are useful when you want to enforce ingestion control across specific logs. For example, you may want to:
- Reduce debug logs across a namespace
- Temporarily reduce informational logs during cost control periods
- Apply sampling to specific clusters or jobs
- Drop logs based on level or content matching
Before you begin
- You must have access to Adaptive Logs in Grafana Cloud.
Note
Only admins are assigned the Drop Rules reader role (
grafana-adaptivelogs-app.drop-rules:read) and can view existing drop rules.
- Ensure you understand which log streams you want to affect.
Create a drop rule
To create a drop rule, complete the following steps.
- In Grafana Cloud, navigate to Adaptive Telemetry.
- Select Adaptive Logs.
- Open the Drop rules tab.
- Click Create a new drop rule.
- Configure the rule:
- Name (required): A descriptive name.
- Drop rate (required): Percentage of matching logs to discard.
- Stream selector (optional): A LogQL stream selector defining target streams (for example,
{env="production"}). Regex matchers (=~,!~) must use enumerable patterns like"a|b|c". Open-ended patterns like"prod.*"are not supported. Reserved labels (prefixed with__) are not allowed. - Log levels (optional): One or more levels detected from log metadata. If multiple levels are specified, a match on any one of them counts as a match (OR logic).
- Log line contains (optional): Filter log line content containing an exact text string. Text strings are case-sensitive. A single rule can include multiple strings, and must match all of them to count as a match (AND logic).
- Expires at (optional): Set expiration.
- Click Create to add the rule.
Manage existing drop rules
From the Drop rules page, you can:
- Edit a rule
- Delete a rule
- Change rule order
- Filter rules by name or log level
- View the impact of a rule
Troubleshooting
Why are no logs being dropped by my rule?
If you are seeing no log lines dropped by your rule, check the following:
- Ensure you are sending logs that match the rule criteria.
- Check if logs are being dropped by a rule that is evaluated earlier. This is controlled by rule order.
Was this page helpful?
Related resources from Grafana Labs


