Skip to content

Commit 75544b2

Browse files
committed
test
1 parent e4eedab commit 75544b2

File tree

1 file changed

+8
-6
lines changed
  • opentelemetry-instrumentation/src/opentelemetry/instrumentation

1 file changed

+8
-6
lines changed

opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,18 +359,20 @@ def _set_status(
359359
if span.is_recording():
360360
if _report_new(sem_conv_opt_in_mode):
361361
span.set_attribute(ERROR_TYPE, status_code_str)
362-
span.set_status(
363-
Status(
364-
StatusCode.ERROR,
365-
"Non-integer HTTP status: " + status_code_str,
366-
)
362+
span.set_status(
363+
Status(
364+
StatusCode.ERROR,
365+
"Non-integer HTTP status: " + status_code_str,
367366
)
367+
)
368368
else:
369369
status = http_status_to_status_code(status_code, server_span=True)
370370

371371
if _report_old(sem_conv_opt_in_mode):
372372
if span.is_recording():
373-
span.set_attribute(SpanAttributes.HTTP_STATUS_CODE, status_code)
373+
span.set_attribute(
374+
SpanAttributes.HTTP_STATUS_CODE, status_code
375+
)
374376
metrics_attributes[SpanAttributes.HTTP_STATUS_CODE] = status_code
375377
if _report_new(sem_conv_opt_in_mode):
376378
if span.is_recording():

0 commit comments

Comments
 (0)