diff --git a/CHANGELOG.md b/CHANGELOG.md index 241c8252d5d..a885e089ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2101](https://github.com/open-telemetry/opentelemetry-python/pull/2101)) - Fix incorrect headers parsing via environment variables ([#2103](https://github.com/open-telemetry/opentelemetry-python/pull/2103)) +- Attribute limits no longer apply to Resource attributes + ([#2138](https://github.com/open-telemetry/opentelemetry-python/pull/2138)) ## [1.5.0-0.24b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.5.0-0.24b0) - 2021-08-26 diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py index ab6df18fdd1..e8c1db383db 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py @@ -1069,11 +1069,6 @@ def __init__( self._span_limits = span_limits or SpanLimits() self._atexit_handler = None - self._resource._attributes = BoundedAttributes( - self._span_limits.max_attributes, - self._resource._attributes, - max_value_len=self._span_limits.max_attribute_length, - ) if shutdown_on_exit: self._atexit_handler = atexit.register(self.shutdown) diff --git a/opentelemetry-sdk/tests/trace/test_trace.py b/opentelemetry-sdk/tests/trace/test_trace.py index 09fcec6a9b3..09989a89f8d 100644 --- a/opentelemetry-sdk/tests/trace/test_trace.py +++ b/opentelemetry-sdk/tests/trace/test_trace.py @@ -1490,7 +1490,6 @@ def test_dropped_attributes(self): self.assertEqual(3, span.dropped_events) self.assertEqual(2, span.events[0].attributes.dropped) self.assertEqual(2, span.links[0].attributes.dropped) - self.assertEqual(2, span.resource.attributes.dropped) def _test_span_limits( self,