From df17995a8d679948687bd0a74922880b7983accc Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 18 Nov 2025 17:19:30 +0100 Subject: [PATCH 1/2] ref(develop/spans): Clarify span attribute units --- develop-docs/sdk/telemetry/spans/span-protocol.mdx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/develop-docs/sdk/telemetry/spans/span-protocol.mdx b/develop-docs/sdk/telemetry/spans/span-protocol.mdx index ad96f84610e428..77aacdd7552a53 100644 --- a/develop-docs/sdk/telemetry/spans/span-protocol.mdx +++ b/develop-docs/sdk/telemetry/spans/span-protocol.mdx @@ -91,6 +91,11 @@ The envelope item payload must contain an `items` array with span one and up to "http.response.status_code": { "type": "integer", "value": 200 + }, + "session.duration": { + "type": "integer", + "value": 164, + "unit": "second" } }, "links": [ @@ -158,9 +163,9 @@ Attributes are stored as key-value pairs where each value is an object with type | Property | Type | Required | Description | |----------|------|----------|-------------| -| `type` | string | Yes | The data type of the attribute value. Values: `"string"`, `"integer"`, `"double"`, `"boolean"` | +| `type` | string | Yes | The data type of the attribute value. Values: `"string"`, `"integer"`, `"double"`, `"boolean", `"string[]"`, `"integer[]"`, `"double[]"`, `"boolean[]"` | | `value` | any | Yes | The actual attribute value, must match the specified type | -| `unit` | string | No | The unit of the attribute value. Example values: `"ms"`, `"s"`, `"bytes"`, `"count"`, `"percent"` | +| `unit` | string | No | The unit of the attribute value. Example values: `"millisecond"`, `"second"`, `"byte"`, `"ratio"`. Units MUST be one of the [MetricUnit](https://getsentry.github.io/relay/relay_metrics/enum.MetricUnit.html)s supported by Relay, excluding `""`, `"none"` or custom units. | #### Common Attribute Keys From a2e02be15e1f7fb658f69bd34954239b4b82add7 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 18 Nov 2025 17:21:05 +0100 Subject: [PATCH 2/2] fix --- develop-docs/sdk/telemetry/spans/span-protocol.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/telemetry/spans/span-protocol.mdx b/develop-docs/sdk/telemetry/spans/span-protocol.mdx index 77aacdd7552a53..12ecc3b1e8af87 100644 --- a/develop-docs/sdk/telemetry/spans/span-protocol.mdx +++ b/develop-docs/sdk/telemetry/spans/span-protocol.mdx @@ -163,7 +163,7 @@ Attributes are stored as key-value pairs where each value is an object with type | Property | Type | Required | Description | |----------|------|----------|-------------| -| `type` | string | Yes | The data type of the attribute value. Values: `"string"`, `"integer"`, `"double"`, `"boolean", `"string[]"`, `"integer[]"`, `"double[]"`, `"boolean[]"` | +| `type` | string | Yes | The data type of the attribute value. Values: `"string"`, `"integer"`, `"double"`, `"boolean"`, `"string[]"`, `"integer[]"`, `"double[]"`, `"boolean[]"` | | `value` | any | Yes | The actual attribute value, must match the specified type | | `unit` | string | No | The unit of the attribute value. Example values: `"millisecond"`, `"second"`, `"byte"`, `"ratio"`. Units MUST be one of the [MetricUnit](https://getsentry.github.io/relay/relay_metrics/enum.MetricUnit.html)s supported by Relay, excluding `""`, `"none"` or custom units. |