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 alrex
parent 847418f397
commit 9bbeb1698e

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: