---
title: Aligning Coralogix and OTel naming conventions
description: OpenTelemetry sometimes introduces breaking changes that, if left unaddressed, can disrupt the experience for customers upgrading to newer versions. To prevent this, enable a `transform` statement to ensure that span attributes and metric labels conform to Coralogix-supported label conventions.
url: https://coralogix.com/docs/user-guides/apm-v2/getting-started/aligning-coralogix-and-otel-naming-conventions/
product: apm
feature: APM Overview
feature_id: apm-general
feature_identifier: apm/apm-general
last_updated: '2026-09-29'
---

# Aligning Coralogix and OTel naming conventions

OpenTelemetry sometimes introduces breaking changes that, if left unaddressed, can disrupt the experience for customers upgrading to newer versions. To prevent this, enable a `transform` statement to ensure that span attributes and metric labels conform to Coralogix-supported label conventions.

## Usage guidelines

Coralogix APM and the OpenTelemetry Collector currently support the label conventions outlined in the [APM label conventions supported by Coralogix](#apm-label-conventions-supported-by-coralogix) section below. If you use labels that do not adhere to Coralogix conventions, utilize a transform processor in the OpenTelemetry Collector to extract the values from your custom labels and map them to the conventions supported by Coralogix.

## Align span attributes with Coralogix-supported metric label conventions

Span Metrics are gathered directly from the collector. For more information, see the [Span Metrics](https://coralogix.com/docs/user-guides/apm-v2/getting-started/span-metrics.md) documentation.

Use the `transform/spanmetrics` processor to align span attributes with Coralogix-supported metric label conventions when collecting Span Metrics. The next section shows how to use the `transform` statement.

### Span Metrics

**Updating the `transform/spanmetrics` processor**

Add the required transformation as part of the `transform/spanmetrics` processor. The following example illustrates how to transform attributes into a supported convention.

```
transform/spanmetrics:

        error_mode: silent

        trace_statements:

        - context: span

          statements:

          - set(attributes["db.namespace"], attributes["db.name"]) where attributes["db.namespace"]

            == nil

          - set(attributes["db.namespace"], attributes["server.address"]) where attributes["db.namespace"]

            == nil

          - set(attributes["db.namespace"], attributes["network.peer.name"]) where attributes["db.namespace"]

            == nil

          - set(attributes["db.namespace"], attributes["net.peer.name"]) where attributes["db.namespace"]

            == nil

          - set(attributes["db.namespace"], attributes["db.system"]) where attributes["db.namespace"]

            == nil

          - set(attributes["db.operation.name"], attributes["db.operation"]) where attributes["db.operation.name"]

            == nil

          - set(attributes["db.collection.name"], attributes["db.sql.table"]) where attributes["db.collection.name"]

            == nil

          - set(attributes["db.collection.name"], attributes["db.cassandra.table"]) where

            attributes["db.collection.name"] == nil

          - set(attributes["db.collection.name"], attributes["db.mongodb.collection"])

            where attributes["db.collection.name"] == nil

          - set(attributes["db.collection.name"], attributes["db.redis.database_index"])

            where attributes["db.collection.name"] == nil

          - set(attributes["db.collection.name"], attributes["db.elasticsearch.path_parts.index"])

            where attributes["db.collection.name"] == nil

          - set(attributes["db.collection.name"], attributes["db.cosmosdb.container"])

            where attributes["db.collection.name"] == nil

          - set(attributes["db.collection.name"], attributes["aws_dynamodb.table_names"])

            where attributes["db.collection.name"] == nil
```

**Adding the `transform/spanmetrics` to the pipeline**

Place the `transform/spanmetrics` processor **above** the `batch` processor in the traces pipeline.

```
        traces:

          exporters:

          - debug

          - spanmetrics

          - forward/db

          processors:

          - memory_limiter

          - resource/metadata

          - k8sattributes

          - transform/k8s_attributes

          - transform/spanmetrics

          - batch
```

## APM label conventions supported by Coralogix

Coralogix fully supports OpenTelemetry, including its semantic conventions. However, as the OpenTelemetry specification evolves, new attributes or updates may be introduced that are not yet fully supported. To ensure consistent processing and accurate visualization within Coralogix, we recommend transforming span attributes and metric labels to align with the supported conventions outlined below.

### Span Metrics

**Services**

| **Metric**           | **Label**                                                          |
| -------------------- | ------------------------------------------------------------------ |
| `duration_ms_sum`    | `span_name, service_name, span_kind, status_code, http_method`     |
| `duration_ms_bucket` | `span_name, service_name, span_kind, status_code, http_method, le` |
| `calls_total`        | `span_name, service_name, span_kind, status_code, http_method`     |
| `duration_ms_count`  | `span_name, service_name, span_kind, status_code, http_method`     |

**Databases**

| **Metric**              | **Label**                                                                                                  |
| ----------------------- | ---------------------------------------------------------------------------------------------------------- |
| `db_calls_total`        | `status_code, db_system, db_namespace, span_name, db_operation_name, db_collection_name, service_name`     |
| `db_duration_ms_sum`    | `status_code, db_system, db_namespace, span_name, db_operation_name, db_collection_name, service_name`     |
| `db_duration_ms_count`  | `status_code, db_system, db_namespace, span_name, db_operation_name, db_collection_name, service_name`     |
| `db_duration_ms_bucket` | `status_code, db_system, db_namespace, span_name, db_operation_name, db_collection_name, service_name, le` |

## Next steps

With your data flowing in, head to the [catalog](https://coralogix.com/docs/user-guides/apm-v2/services.md) to start exploring your services and databases.

## Additional resources

* [More examples in Coralogix public GitHub repository](https://github.com/coralogix/telemetry-shippers/tree/master/otel-integration/k8s-helm#note-on-semantic-conventions-for-old-otel-sdks)
* [values.yaml template](https://github.com/coralogix/telemetry-shippers/blob/master/otel-integration/k8s-helm/values.yaml)
