From 06638fc65519a021e29a213e54feae30880ce39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Wed, 11 Nov 2020 02:15:41 +0100 Subject: [PATCH] Nulls SHOULD NOT be allowed in arrays. (#1214) * Nulls SHOULD NOT be allowed in arrays. * Fill in CHANGELOG link Co-authored-by: Armin Ruech --- CHANGELOG.md | 2 ++ specification/common/common.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0dfeb3401d..a9bfdfb6b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,8 @@ New: Updates: +- Clarify null SHOULD NOT be allowed even in arrays + ([#1214](https://github.com/open-telemetry/opentelemetry-specification/pull/1214)) - Remove ordering SHOULD-requirement for attributes ([#1212](https://github.com/open-telemetry/opentelemetry-specification/pull/1212)) - Make `process.pid` optional, split `process.command_args` from `command_line` diff --git a/specification/common/common.md b/specification/common/common.md index 15d25304c44..f1526b95187 100644 --- a/specification/common/common.md +++ b/specification/common/common.md @@ -31,6 +31,9 @@ processors / exporters. Attribute values of `null` are not valid and attempting to set a `null` value is undefined behavior. +`null` values SHOULD NOT be allowed in arrays. However, if it is impossible to +make sure that no `null` values are accepted +(e.g. in languages that do not have appropriate compile-time type checking), `null` values within arrays MUST be preserved as-is (i.e., passed on to span processors / exporters as `null`). If exporters do not support exporting `null` values, they MAY replace those values by 0, `false`, or empty strings.