Skip to content

Exempt resource attributes from span limits #2138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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