Skip to content

Commit

Permalink
Update _semconv.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen authored Jul 11, 2024
1 parent 06fffb1 commit e4eedab
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,14 @@ def _set_status(
if status_code < 0:
metrics_attributes[ERROR_TYPE] = status_code_str
if span.is_recording():
if _report_new(sem_conv_opt_in_mode):
span.set_attribute(ERROR_TYPE, status_code_str)
span.set_status(
Status(
StatusCode.ERROR,
"Non-integer HTTP status: " + status_code_str,
if _report_new(sem_conv_opt_in_mode):
span.set_attribute(ERROR_TYPE, status_code_str)
span.set_status(
Status(
StatusCode.ERROR,
"Non-integer HTTP status: " + status_code_str,
)
)
)
else:
status = http_status_to_status_code(status_code, server_span=True)

Expand Down

0 comments on commit e4eedab

Please sign in to comment.