Skip to content

Commit 7ed6185

Browse files
xrmxherin049
andauthored
Apply suggestions from code review
Co-authored-by: Lukas Hering <40302054+herin049@users.noreply.github.com>
1 parent 36dd082 commit 7ed6185

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3

instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,12 @@ def instrumented_urlopen(wrapped, instance, args, kwargs):
533533
)
534534

535535
if span.is_recording():
536-
response_headers_to_set = get_custom_header_attributes(
536+
span.set_attributes(get_custom_header_attributes(
537537
response.headers,
538538
captured_response_headers,
539539
sensitive_headers,
540540
normalise_response_header_name,
541-
)
542-
for header, value in response_headers_to_set.items():
543-
span.set_attribute(header, value)
541+
))
544542

545543
return response
546544

0 commit comments

Comments
 (0)