Use is_recording flag in flask, django, tornado, boto, botocore instrumentations (#1164)
This commit is contained in:
parent
7718d88b19
commit
bc3dc247bb
|
|
@ -91,6 +91,8 @@ def collect_request_attributes(scope):
|
|||
|
||||
def set_status_code(span, status_code):
|
||||
"""Adds HTTP response attributes to span using the status_code argument."""
|
||||
if not span.is_recording():
|
||||
return
|
||||
try:
|
||||
status_code = int(status_code)
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Reference in New Issue