| name | cost-management |
| license | Apache-2.0 |
| description | Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume. Covers FOCUS-compliant billing dashboards, cost-attribution labels in Alloy, Adaptive Metrics (cardinality reduction), Adaptive Logs (drop/sample), Adaptive Traces (tail sampling), usage alerts, and an optimization checklist. Use when investigating a high Grafana Cloud bill, attributing observability cost to a team or service, reducing active series / log bytes / trace spans, or setting up usage / quota alerts — even when the user says "our Grafana bill is too high", "who's burning the most metrics", "drop debug logs", "sample our traces", or "alert me before we hit quota" without naming Cost Management. |
Grafana Cloud Cost Management
Docs: https://grafana.com/docs/grafana-cloud/cost-management-and-billing/
Reduce metric / log / trace spend with Adaptive signals + cost-attribution labels.
Prerequisites
- A Grafana Cloud stack with Adaptive Metrics / Logs / Traces enabled (visible under Cost Management)
- Alloy (or Grafana Agent) ingesting telemetry, with API key in scope
metrics:write + logs:write (+ traces:write)
- Admin access to the stack to apply Adaptive recommendations
Common Workflows
1. Attribute cost to a team / service
# 1. Add external labels in Alloy (metrics + logs configs)
prometheus.remote_write "cloud" {
endpoint { url = sys.env("PROMETHEUS_URL") /* ... */ }
external_labels = { team = "platform", project = "checkout-service" }
}
curl -X POST http://localhost:12345/-/reload
See references/adaptive-signals.md for the full Alloy snippet.
2. Cut metric cardinality with Adaptive Metrics
curl https://<stack>.grafana.net/api/plugins/grafana-adaptive-metrics-app/resources/v1/recommendations \
-H "Authorization: Bearer <token>" | jq '.recommendations | length'
3. Drop noisy logs in Alloy
# 1. Add a filter stage (see references/adaptive-signals.md for the full block)
loki.process "filter_logs" {
forward_to = [loki.write.cloud.receiver]
stage.drop { expression = ".*GET /health.*" }
}
curl -X POST http://localhost:12345/-/reload
4. Set a usage alert before you hit quota
See references/alerts-and-queries.md for ready-to-paste rules (MetricsUsageHigh, LogsIngestionHigh).
Optimization checklist
References
Resources