Use is_recording flag in flask, django, tornado, boto, botocore instrumentations (#1164)

This commit is contained in:
Leighton Chen 2020-09-30 10:36:57 -04:00 committed by GitHub
parent 7718d88b19
commit bc3dc247bb
1 changed files with 2 additions and 0 deletions

View File

@ -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: