Skip to content

Commit b78f579

Browse files
authored
Fix AwsSpanMetricsProcessor on_end (#26)
I tried to be clever and use python's map & lambda, but it's not working. Change to a simple for-loop to resolve. *Issue #, if available:* *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 2d70a6e commit b78f579

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def on_end(self, span: ReadableSpan) -> None:
6969
attribute_dict: dict[str, BoundedAttributes] = self._generator.generate_metric_attributes_dict_from_span(
7070
span, self._resource
7171
)
72-
map(lambda attributes: self._record_metrics(span, attributes), attribute_dict.values())
72+
for attributes in attribute_dict.values():
73+
self._record_metrics(span, attributes)
7374

7475
@override
7576
def shutdown(self) -> None:

0 commit comments

Comments
 (0)