Skip to content

Fix two typos #28

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
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _add_metric_attributes(self, spans: Sequence[ReadableSpan]) -> Sequence[Read

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

new_attributes[AWS_SPAN_KIND] = LOCAL_ROOT
Expand All @@ -110,10 +110,10 @@ def wrap_span_with_attributes(span: ReadableSpan, attributes: BoundedAttributes)
original_attributes: AttributesT = span.attributes
update_attributes: types.Attributes = {}
# Copy all attribute in span into update_attributes
for key, value in original_attributes:
for key, value in original_attributes.items():
update_attributes[key] = value
# Append all attribute in attributes that is not in original_attributes into update_attributes
for key, value in attributes:
for key, value in attributes.items():
if key not in update_attributes:
update_attributes[key] = value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class AwsSpanMetricsProcessorBuilder:
_scope_name: str = _DEFAULT_SCOPE_NAME

def __init__(self, meter_provider: MeterProvider, resource: Resource):
self.meter_provider = meter_provider
self.resource = resource
self._meter_provider = meter_provider
self._resource = resource

def set_generator(self, generator: MetricAttributeGenerator) -> "AwsSpanMetricsProcessorBuilder":
"""
Expand Down