mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-30 21:56:07 +08:00
Use is_recording flag in flask, django, tornado, boto, botocore instrumentations (#1164)
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user