Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attribute check #1311

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
5 changes: 4 additions & 1 deletion newrelic/samplers/gc_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ def enabled(self):
settings = global_settings()
if platform.python_implementation() == "PyPy" or not settings:
return False
else:
# This might be inheriting from Settings instead of TopLevelSettings
elif settings and hasattr(settings, "gc_runtime_metrics"):
return settings.gc_runtime_metrics.enabled
else:
return False

@property
def top_object_count_limit(self):
Expand Down
Loading