Skip to content

Commit 6afac54

Browse files
XinRanZhAWSADOT Patch workflow
andauthored
Fix two typos (#28)
*Issue #, if available:* There are two typos on the code, fixed By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: ADOT Patch workflow <[email protected]>
1 parent b78f579 commit 6afac54

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_metric_attributes_span_exporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _add_metric_attributes(self, spans: Sequence[ReadableSpan]) -> Sequence[Read
8989

9090
def copy_attributes_with_local_root(attributes: BoundedAttributes) -> BoundedAttributes:
9191
new_attributes: types.Attributes = {}
92-
for key, value in attributes:
92+
for key, value in attributes.items():
9393
new_attributes[key] = value
9494

9595
new_attributes[AWS_SPAN_KIND] = LOCAL_ROOT
@@ -110,10 +110,10 @@ def wrap_span_with_attributes(span: ReadableSpan, attributes: BoundedAttributes)
110110
original_attributes: AttributesT = span.attributes
111111
update_attributes: types.Attributes = {}
112112
# Copy all attribute in span into update_attributes
113-
for key, value in original_attributes:
113+
for key, value in original_attributes.items():
114114
update_attributes[key] = value
115115
# Append all attribute in attributes that is not in original_attributes into update_attributes
116-
for key, value in attributes:
116+
for key, value in attributes.items():
117117
if key not in update_attributes:
118118
update_attributes[key] = value
119119

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_span_metrics_processor_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class AwsSpanMetricsProcessorBuilder:
2929
_scope_name: str = _DEFAULT_SCOPE_NAME
3030

3131
def __init__(self, meter_provider: MeterProvider, resource: Resource):
32-
self.meter_provider = meter_provider
33-
self.resource = resource
32+
self._meter_provider = meter_provider
33+
self._resource = resource
3434

3535
def set_generator(self, generator: MetricAttributeGenerator) -> "AwsSpanMetricsProcessorBuilder":
3636
"""

0 commit comments

Comments
 (0)