From 8eea5a431ff92ee30a6892e7a2add10effa8705d Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 18 Jun 2026 11:03:42 -0700 Subject: [PATCH 1/2] opentelemetry-sdk: merge doesn't need a copy, dict already does this Removing a call to .copy() in the merge function as it is unnecessary. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py index 09120f7149..d10f84345b 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py @@ -227,7 +227,7 @@ def merge(self, other: "Resource") -> "Resource": Returns: The newly-created Resource. """ - merged_attributes = dict(self.attributes).copy() + merged_attributes = dict(self.attributes) merged_attributes.update(other.attributes) if self.schema_url == "": From 239a893f4157fbdb8107f35ae41ba14a2b49a058 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 18 Jun 2026 11:06:53 -0700 Subject: [PATCH 2/2] changelog Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- .changelog/5326.changed | 1 + 1 file changed, 1 insertion(+) create mode 100644 .changelog/5326.changed diff --git a/.changelog/5326.changed b/.changelog/5326.changed new file mode 100644 index 0000000000..8ce1bead26 --- /dev/null +++ b/.changelog/5326.changed @@ -0,0 +1 @@ +opentelemetry-sdk: merge doesn't need a copy, dict already does this \ No newline at end of file