From 998ba832e1dc4f3d1d6a6d57c03b2d1a9b5e03c2 Mon Sep 17 00:00:00 2001 From: Owais Lone Date: Fri, 27 Aug 2021 07:01:16 +0530 Subject: [PATCH] Exempt resources from attribute limits Resources are not susceptible to scenarios where excessive attributes can be recorded unlike Spans. Resources are also immutable and it can be hard for some SDKs to apply the limits at source at the time the attributes are added to a resource. Furthermore, limits and Resources both are generally defined and passed on to a TracerProvider which forces a TracerProvider to either mutate the resource or generate a new one with duplicate attributes in order to apply the limits to it. --- CHANGELOG.md | 3 +++ specification/common/common.md | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6fd1db3a40..0f3a18c37cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ release. ### Resource +- Exempt Resource from attribute limits. + ([#1892](https://github.com/open-telemetry/opentelemetry-specification/pull/1892)) + ### Semantic Conventions - BREAKING: Change enum member IDs to lowercase without spaces, not starting with numbers. diff --git a/specification/common/common.md b/specification/common/common.md index 6cb26c12f99..ea8b75e8d7d 100644 --- a/specification/common/common.md +++ b/specification/common/common.md @@ -89,6 +89,14 @@ general limit. #### Exempt Entities +Resource attributes SHOULD be exempt from the limits described above as resources +are not susceptible to the scenarios (auto-instrumentation) that result in +excessive attributes count or size. Resources are also sent only once per batch +instead of per span so it is relatively cheaper to have more/larger attributes +on them. Resources are also immutable by design and they are generally passed +down to TracerProvider along with limits. This makes it awkward to implement +attribute limits for Resources. + Attributes, which belong to Metrics, are exempt from the limits described above at this time, as discussed in [Metrics Attribute Limits](../metrics/sdk.md#attribute-limits).