---
title: Compact Span Metrics
description: Compact Span Metrics is an optimized metric type designed to improve the performance of the APM Service Catalog and Database Catalog pages, especially in large-scale environments.
url: https://coralogix.com/docs/user-guides/apm/getting-started/using-compact-span-metric/
product: apm
feature: OTel Span Metrics
feature_id: apm-otel-collector-spanmetrics
feature_identifier: apm/apm-otel-collector-spanmetrics
last_updated: '2026-10-13'
---

# Compact Span Metrics

## Overview

Compact Span Metrics is an optimized metric type designed to improve the performance of the APM [Service Catalog](https://coralogix.com/docs/user-guides/apm/features/service-catalog.md) and [Database Catalog](https://coralogix.com/docs/user-guides/apm/features/database-monitoring.md) pages, especially in large-scale environments. Traditional [Span Metrics](https://coralogix.com/docs/user-guides/apm/getting-started/span-metrics.md) can carry very high cardinality, leading to slow load times and limited scalability. Compact Span Metrics addresses this by keeping only the most essential dimensions, reducing metric cardinality while delivering the core insights needed for monitoring and troubleshooting.

Note

* Compact Span Metrics is enabled by default only for Span Metrics users.
* This setup is additive: compact metrics are sent alongside the existing Span Metrics, not as a replacement. This is relevant for both Service and Database Catalogs.
* When you enable Compact Span Metrics, data in the main catalog pages will appear only from the moment you start sending it. Drilldowns will continue to use the full Span Metrics as before.

## Key benefits

* **Uses essential labels only:**

  * Service Catalog: `service_name`, `status_code`, `k8s_cluster_name`, `span_kind`, `host.name`
  * Database Catalog: `service_name`, `status_code`, `k8s_cluster_name`, `db_namespace`, `db_system`, `host.name`

* **Optional histogram control:** the `le` histogram can be disabled to further reduce load.

* **Reduction in cardinality:** lowers metric permutations.

* **Low-latency performance:** enables much faster load times in large environments.

* **Backward compatibility:** compact metrics are sent in addition to existing Span Metrics, ensuring no breakage in drilldowns.

## Enabling Compact Span Metrics

### With Coralogix OTel integration

Using the Coralogix latest integration is strongly recommended, as it’s continuously updated and aligned with the latest OpenTelemetry releases. To benefit from Compact Span Metrics, make sure to upgrade your otel-integration to version `v0.0.230` or higher.

The following metrics are enabled by default:

* Service catalog:

  * `compact_calls_total`
  * `compact_duration_ms_count`
  * `compact_duration_ms_sum`
  * `compact_duration_ms_bucket`

* Databases catalog:

  * `db_compact_calls_total`
  * `db_compact_duration_ms_count`
  * `db_compact_duration_ms_sum`
  * `db_compact_duration_ms_bucket`

### Without Coralogix OTel integration

<!--$?-->

<!--/$-->

## UI changes with Compact Span Metrics

The following fields are affected when Compact Span Metrics is enabled:

* Unsupported filters are hidden in the main service catalog and db catalog pages.
* Service and Database drilldown pages remain unchanged and continue to use all dimensions from the full Span Metrics.

## Disabling Compact Span Metrics

You can disable the Services catalog compact metrics (`compact_*`), the Databases catalog compact metrics (`db_compact_*`), or both.

**With the Coralogix OTel integration**

1. Update to the latest otel-integration: `v0.0.230` or higher.
2. In your Helm chart configuration, set `compactMetrics.enabled: false` under `spanMetrics` (Services catalog) and/or `dbMetrics` (Databases catalog):

```
otel-integration:

  opentelemetry-agent:

    presets:

      spanMetrics:

        enabled: true

        # Services catalog compact metrics (compact_*)

        compactMetrics:

          enabled: false

          dropHistogram: true

        # Databases catalog compact metrics (db_compact_*)

        dbMetrics:

          enabled: true

          compactMetrics:

            enabled: false

            dropHistogram: true
```

**Running your own collector**

Remove the compact metrics you no longer need from your collector configuration, then restart the Collector:

* **Services catalog**: the `spanmetrics/compact` connector and its `traces/compact` and `metrics/compact` pipelines.
* **Databases catalog**: the `spanmetrics/db_compact` connector and its `traces/db_compact` and `metrics/db_compact` pipelines.

Also remove the matching `forward/compact` or `forward/db_compact` connector from the `traces` pipeline exporters.

## Next steps

Already running Events2Metrics? See [Migration from Events2Metrics to Span Metrics](https://coralogix.com/docs/user-guides/apm/getting-started/migration-from-e2m.md) for the recommended switchover path.

For per-service visibility into APM volume and cardinality after compact metrics are enabled, use [Service Governance](https://coralogix.com/docs/user-guides/account-management/payment-and-billing/metrics-usage-analyzer/apm.md) in the Metrics Usage Analyzer.
