|
| 1 | +--- |
| 2 | +title: Semantic conventions |
| 3 | +description: 'This page explains Axiom’s support for OTel semantic conventions and what it means for your data.' |
| 4 | +--- |
| 5 | + |
| 6 | +[OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/) specify standard attribute names and values for different kinds of operations and data. |
| 7 | + |
| 8 | +## Trace attributes in Axiom |
| 9 | + |
| 10 | +The OTel trace attributes you send to Axiom are available under the following fields: |
| 11 | + |
| 12 | +- Attributes that follow semantic conventions are nested fields under the `attributes` field. For example, `attributes.http.method` or `attributes.http.url`. |
| 13 | +- Resource attributes that follow semantic conventions are nested fields under the `resource` field. For example, `resource.host.name` or `resource.host.id`. |
| 14 | +- Custom attributes that don’t match any semantic conventions are nested fields under the `attributes.custom` map field. |
| 15 | + |
| 16 | +For more information on map fields and querying nested fields, see [Map fields](/apl/data-types/map-fields). |
| 17 | + |
| 18 | +## Supported versions |
| 19 | + |
| 20 | +For the versions of OTel semantic conventions that Axiom supports, see [System requirements](/reference/system-requirements#opentelemetry). |
| 21 | + |
| 22 | +(Recommended) When you send OTel data to Axiom, include the version of the OTel semantic conventions that your data follows. This ensures that your data is properly shaped in Axiom. |
| 23 | + |
| 24 | +If you don’t define the version and Axiom can’t detect it, Axiom defaults to the version specified in [System requirements](/reference/system-requirements#opentelemetry). In this case, Axiom nests attributes that don’t match the semantic conventions of the default version under the `attributes.custom` map field. |
| 25 | + |
| 26 | +## Semantic conventions upgrades |
| 27 | + |
| 28 | +To guarantee the best logging experience with OTel, Axiom regularly updates the list of supported versions of semantic conventions and sometimes the default version. These updates can change the shape of your data. Axiom announces these changes in the [Changelog](https://axiom.co/changelog) and you might need to take action: |
| 29 | + |
| 30 | +- If you send data to Axiom using an unsupported version of OTel semantic conventions, be aware that the shape of your data can change when Axiom adds support for new versions. |
| 31 | +- When you send OTel data to Axiom, include the version of the OTel semantic conventions that your data follows. This ensures that your data is properly shaped in Axiom and it won’t be affected when Axiom changes the default version. |
| 32 | + |
| 33 | +In addition, the shape of your data can change when you choose to migrate to a newer version of OTel semantic conventions. |
| 34 | + |
| 35 | +See the sections below for more details on how your data can change and the actions you need to take when this happens. |
| 36 | + |
| 37 | +### Changes to list of supported versions |
| 38 | + |
| 39 | +After Axiom adds support for new versions of OTel semantic conventions, the shape of your data can change when the following are all true: |
| 40 | + |
| 41 | +- Before the update, you sent data to Axiom using an unsupported version of OTel semantic conventions. |
| 42 | +- After the update, the version of OTel semantic conventions that you used becomes supported. |
| 43 | + |
| 44 | +In this case, the shape of your data can change: |
| 45 | + |
| 46 | +- Before the update, attributes that Axiom couldn’t match to the previously supported semantic conventions were nested under the `attributes.custom` map field. |
| 47 | +- After the update, Axiom matches these attributes to the newly supported semantic conventions. The newly recognised attributes are nested under the `attributes` or `resource` fields, similarly to all other attributes that follow semantic conventions. |
| 48 | + |
| 49 | +When the shape of your data changes, you need to [take action](#take-action-when-shape-of-data-changes). |
| 50 | + |
| 51 | +### Changes to default version |
| 52 | + |
| 53 | +If you don’t specify the version of the OTel semantic conventions that your data follows when you send OTel data to Axiom, Axiom interprets the data using the default version. |
| 54 | + |
| 55 | +After Axiom changes the default version of OTel semantic conventions, the shape of your data can change when you don’t specify the version of the OTel semantic conventions in the data you send to Axiom. For this reason, to prevent changes to your data, include the version of the OTel semantic conventions that your data follows when you send OTel data to Axiom. This ensures that your data is properly shaped in Axiom and it won’t be affected when Axiom changes the default version. |
| 56 | + |
| 57 | +When Axiom updates the default version of OTel semantic conventions, the shape of your data can change: |
| 58 | + |
| 59 | +- Before the update, attributes that become supported between the old and the new default versions are nested under the `attributes.custom` field. After the update, these attributes are nested under the `attributes` or `resource` fields. |
| 60 | +- Before the update, attributes that became deprecated between the old and the new default versions are nested under the `attributes` or `resource` fields. After the update, these attributes are nested under the `attributes.custom` field. |
| 61 | + |
| 62 | +When the shape of your data changes, you need to [take action](#take-action-when-shape-of-data-changes). |
| 63 | + |
| 64 | +### Migrate to new version |
| 65 | + |
| 66 | +When you choose to migrate to a newer version of OTel semantic conventions, the shape of your data can change. Some attributes can become supported, deprecated, renamed, or relocated. |
| 67 | + |
| 68 | +When the shape of your data changes, you need to [take action](#take-action-when-shape-of-data-changes). |
| 69 | + |
| 70 | +### Determine changes between versions |
| 71 | + |
| 72 | +To determine the changes between different versions of OTel semantic conventions, compare the [schema files](https://github.com/open-telemetry/semantic-conventions/tree/main/schemas) or the [changelog](https://github.com/open-telemetry/semantic-conventions/releases) in the OTel documentation. This informs you about how the shape of your data can change as a result of semantic conventions upgrades. |
| 73 | + |
| 74 | +## Take action when shape of data changes |
| 75 | + |
| 76 | +When some attributes are relocated or renamed, the shape of your data changes and you need to take action. |
| 77 | + |
| 78 | +For example, assume that Axiom supports OTel semantic conventions up to version 1.25. You send data to Axiom that follows version 1.32 and you don’t specify the version. On June 12th 2025, Axiom adds support for versions up to 1.32 and makes version 1.32 the default. The following happens with the attribute `db.system.name`: |
| 79 | + |
| 80 | +- You send the attribute `db.system.name` to Axiom because your data follows version 1.32. The shape of the data you send to Axiom doesn’t change during the update. |
| 81 | +- Before the update, Axiom interpreted your data using the old default version 1.25. It didn’t recognize `db.system.name` and nested it under `attributes.custom`. |
| 82 | +- After the update, Axiom interprets your data using the new default version 1.32. It recognizes `db.system.name` properly and nests it under `attributes`. |
| 83 | + |
| 84 | +As a result, the attribute is relocated from `['attributes.custom']['db.system.name']` to `['attributes.db.system.name']`. You need to update all saved queries, dashboards, or monitors that reference the attribute. You have the following options: |
| 85 | + |
| 86 | +- [Update queries to reference the new location](#reference-new-location) |
| 87 | +- [Update queries to reference both locations](#reference-both-locations) |
| 88 | + |
| 89 | +### Reference new location |
| 90 | + |
| 91 | +When you update affected queries to reference the new location, the query results only include data you send after the semantic conventions upgrade. |
| 92 | + |
| 93 | +For example, a saved query references the old location before the update: |
| 94 | + |
| 95 | +```kusto |
| 96 | +['otel-demo-traces'] |
| 97 | +| where ['service.name'] == "frontend" |
| 98 | +| project ['attributes.custom']['db.system.name'] |
| 99 | +``` |
| 100 | + |
| 101 | +After the update, change the query to the following: |
| 102 | + |
| 103 | +```kusto |
| 104 | +['otel-demo-traces'] |
| 105 | +| where ['service.name'] == "frontend" |
| 106 | +| project ['attributes.db.system.name'] |
| 107 | +``` |
| 108 | + |
| 109 | +### Reference both locations |
| 110 | + |
| 111 | +To ensure that affected queries include data from the attribute that you send before and after the semantic conventions upgrade, use [coalesce](/apl/scalar-functions/string-functions#coalesce) in your query. This function evaluates a list of expressions and returns the first non-null value. In this case, pass the old and the new locations of the attribute to the `coalesce` function. |
| 112 | + |
| 113 | +For example, a saved query references the old location before the update: |
| 114 | + |
| 115 | +```kusto |
| 116 | +['otel-demo-traces'] |
| 117 | +| where ['service.name'] == "frontend" |
| 118 | +| project ['attributes.custom']['db.system.name'] |
| 119 | +``` |
| 120 | + |
| 121 | +After the update, change the query to the following: |
| 122 | + |
| 123 | +```kusto |
| 124 | +['otel-demo-traces'] |
| 125 | +| where ['service.name'] == "frontend" |
| 126 | +| project coalesce(['attributes.custom']['db.system.name'], ['attributes.db.system.name']) |
| 127 | +``` |
0 commit comments