diff --git a/newrelic/api/database_trace.py b/newrelic/api/database_trace.py index b17d4036df..f481a20a7f 100644 --- a/newrelic/api/database_trace.py +++ b/newrelic/api/database_trace.py @@ -137,6 +137,10 @@ def finalize_data(self, transaction, exc=None, value=None, tb=None): database_name = None settings = transaction.settings + + if not settings: + return + tt = settings.transaction_tracer agent_limits = settings.agent_limits ds_tracer = settings.datastore_tracer