File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
opentelemetry-instrumentation/src/opentelemetry/instrumentation Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff 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 ():
You can’t perform that action at this time.
0 commit comments