diff --git a/newrelic/config.py b/newrelic/config.py index 3ed9e83284..6c65f0e0ea 100644 --- a/newrelic/config.py +++ b/newrelic/config.py @@ -362,9 +362,9 @@ def _process_configuration(section): 'get', _map_inc_excl_attributes) _process_setting(section, 'transaction_name.naming_scheme', 'get', None) - _process_setting(section, 'gc_profiler.enabled', + _process_setting(section, 'gc_runtime_metrics.enabled', 'getboolean', None) - _process_setting(section, 'gc_profiler.top_object_count_limit', + _process_setting(section, 'gc_runtime_metrics.top_object_count_limit', 'getint', None) _process_setting(section, 'thread_profiler.enabled', 'getboolean', None) diff --git a/newrelic/core/config.py b/newrelic/core/config.py index 61fe747f1b..32ba9ef6a0 100644 --- a/newrelic/core/config.py +++ b/newrelic/core/config.py @@ -109,7 +109,7 @@ class AttributesSettings(Settings): pass -class GCProfilerSettings(Settings): +class GCRuntimeMetricsSettings(Settings): pass @@ -324,7 +324,7 @@ class EventHarvestConfigHarvestLimitSettings(Settings): _settings = TopLevelSettings() _settings.attributes = AttributesSettings() -_settings.gc_profiler = GCProfilerSettings() +_settings.gc_runtime_metrics = GCRuntimeMetricsSettings() _settings.thread_profiler = ThreadProfilerSettings() _settings.transaction_tracer = TransactionTracerSettings() _settings.transaction_tracer.attributes = TransactionTracerAttributesSettings() @@ -613,8 +613,8 @@ def default_host(license_key): _settings.thread_profiler.enabled = True _settings.cross_application_tracer.enabled = True -_settings.gc_profiler.enabled = False -_settings.gc_profiler.top_object_count_limit = 5 +_settings.gc_runtime_metrics.enabled = False +_settings.gc_runtime_metrics.top_object_count_limit = 5 _settings.transaction_events.enabled = True _settings.transaction_events.attributes.enabled = True diff --git a/newrelic/samplers/gc_data.py b/newrelic/samplers/gc_data.py index 31718027a2..0c5cb3b94f 100644 --- a/newrelic/samplers/gc_data.py +++ b/newrelic/samplers/gc_data.py @@ -38,12 +38,12 @@ def enabled(self): return False else: settings = global_settings() - return settings.gc_profiler.enabled + return settings.gc_runtime_metrics.enabled @property def top_object_count_limit(self): settings = global_settings() - return settings.gc_profiler.top_object_count_limit + return settings.gc_runtime_metrics.top_object_count_limit def record_gc(self, phase, info): if not self.enabled: diff --git a/tests/agent_unittests/test_sampler_metrics.py b/tests/agent_unittests/test_sampler_metrics.py index 63d9d23116..3dd9c307f3 100644 --- a/tests/agent_unittests/test_sampler_metrics.py +++ b/tests/agent_unittests/test_sampler_metrics.py @@ -95,8 +95,8 @@ def test_gc_metrics_collection(gc_data_source, top_object_count_limit): @override_generic_settings( settings, { - "gc_profiler.enabled": True, - "gc_profiler.top_object_count_limit": top_object_count_limit, + "gc_runtime_metrics.enabled": True, + "gc_runtime_metrics.top_object_count_limit": top_object_count_limit, }, ) def _test(): @@ -126,7 +126,7 @@ def _test(): ) @pytest.mark.parametrize("enabled", (True, False)) def test_gc_metrics_config(gc_data_source, enabled): - @override_generic_settings(settings, {"gc_profiler.enabled": enabled}) + @override_generic_settings(settings, {"gc_runtime_metrics.enabled": enabled}) def _test(): assert gc_data_source.enabled == enabled