Use Adaptive Metrics to reduce cardinality
Documentation
Grafana Cloud
Monitor applications
Application Observability
Set up a Collector
Adaptive Metrics
Grafana Cloud
Use Adaptive Metrics to reduce cardinality
You can use Adaptive Metrics to solve increased cardinality issues and reduce your Grafana Cloud costs.
Set up the Adaptive Metrics HTTP API and upload the following aggregation rules that add the collector_id
label to exported metrics:
json
{
"rules": [
{
"metric": "traces_spanmetrics_latency_sum",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_spanmetrics_latency_count",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_spanmetrics_latency_bucket",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_spanmetrics_calls_total",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_spanmetrics_size_total",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_total",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_failed_total",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_server_seconds_sum",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_server_seconds_count",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_server_seconds_bucket",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_client_seconds_bucket",
"drop_labels": ["collector_id", "namespace", "source"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_client_seconds_sum",
"drop_labels": ["collector_id", "namespace", "source"],
"aggregations": ["sum:counter"]
},
{
"metric": "traces_service_graph_request_client_seconds_count",
"drop_labels": ["collector_id", "namespace", "source"],
"aggregations": ["sum:counter"]
},
{
"metric": "target_info",
"drop_labels": ["collector_id"],
"aggregations": ["sum:counter"]
}
]
}
Was this page helpful?
Related documentation
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
5 Mar
Getting started with managing your metrics, logs, and traces using Grafana
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
26 Feb
Intro to Kubernetes monitoring in Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.
60 min
Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.