> ## Documentation Index
> Fetch the complete documentation index at: https://docs-xcor.paloaltonetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shape metric data

> Learn how metric shaping rules and downsampling control cardinality, license consumption, and query performance.

Managing the cardinality of persisted data can be challenging when determining which
metrics to send to Palo Alto Networks Cortex XCOR. *Metric cardinality* is the
number of unique time series produced by a combination of metric names and their
associated labels. Cardinality is the total number of these combinations. The more
combinations there are, the greater a metric's cardinality is, and the more data
Cortex XCOR persists. This can affect
[your license](/administer/limits-licensing/concepts/capacity-licensing#persisted-cardinality).

<Note>
  Learn about strategies and tools you can use to
  [reduce cardinality](/control/shaping/shape-metrics/reduce-cardinality).
</Note>

Cortex XCOR includes various
[*shaping rules*](/control/shaping/shape-metrics/rules) to manipulate the data you
send to Cortex XCOR. Use metric shaping rules to reduce the metrics you
store in Cortex XCOR, optimize query performance, and create aliases for
expressions.

## Downsample data

[Collectors](/ingest) ingest metrics at specific intervals, based on system
configuration. This granularity of metric data can be helpful in diagnostic efforts,
but certain issues might not be served by such granularity. If you can diagnose
production issues by using a coarser granularity of metric data, *downsampling* the
data reduces the amount of data persisted to the Cortex XCOR database.

Downsample incoming data in Cortex XCOR using these methods:

* Change the Chronosphere Collector configuration by
  [changing the rate](/ingest/metrics-traces/collector/discover/scrape-configuration#global-scrape-configuration)
  at which the Chronosphere Collector publishes metrics to the server.
* Use [mapping rules](/control/shaping/shape-metrics/rules/mapping) to downsample metrics
  that aren't aggregated.
* Use [rollup rules](/control/shaping/shape-metrics/rules/rollup) to downsample aggregated
  metrics.

Over time, persisted data uses significant storage capacity. Cortex XCOR
performs [long-term downsampling](/control/shaping/shape-metrics/downsampling) to control data
storage costs while retaining important statistics.

Be aware that [late-arriving data](/administer/limits-licensing/limits/metric-limits#late-arriving-metrics)
can affect downsampling.


## Related topics

- [Shape and sample your data](/control/shaping.md)
- [Controlling Metrics](/academy/courses/controlling-metrics.md)
- [Query Optimization for Metrics](/academy/courses/query-optimization-for-metrics.md)
- [Metric shaping rules](/control/shaping/shape-metrics/rules.md)
- [Manage telemetry data budgets](/overview/guides/manage-budgets.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.