Skip to content

Commit

Permalink
Exempt resource attributes from span limits
Browse files Browse the repository at this point in the history
  • Loading branch information
owais committed Sep 22, 2021
1 parent 8b5a967 commit 82f841c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 0 additions & 5 deletions opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 82f841c

Please sign in to comment.