コード例 #1
0
ファイル: agent.py プロジェクト: lxp20201/lxp
    def remove_thread_utilization(self):

        _logger.debug('Removing thread utilization data source from all '
                      'applications')

        source_name = thread_utilization_data_source.__name__
        factory_name = 'Thread Utilization'

        with self._lock:
            source_names = [s[0].__name__ for s in self._data_sources[None]]
            if source_name in source_names:
                idx = source_names.index(source_name)
                self._data_sources[None].pop(idx)

            # Clear out the data samplers that add thread utilization custom
            # metrics every harvest (for each application)

            for application in self._applications.values():
                application.remove_data_source(factory_name)

        # The thread utilization data source may have been started, so we
        # must clear out the list of trackers that transactions will use to add
        # thread.concurrency attributes

        from newrelic.core.thread_utilization import _utilization_trackers
        _utilization_trackers.clear()
コード例 #2
0
ファイル: agent.py プロジェクト: bobbyrward/newrelic
    def remove_thread_utilization(self):

        _logger.debug('Removing thread utilization data source from all '
                'applications')

        source_name = thread_utilization_data_source.__name__
        factory_name = 'Thread Utilization'

        with self._lock:
            source_names = [s[0].__name__ for s in self._data_sources[None]]
            if source_name in source_names:
                idx = source_names.index(source_name)
                self._data_sources[None].pop(idx)

            # Clear out the data samplers that add thread utilization custom
            # metrics every harvest (for each application)

            for application in self._applications.values():
                application.remove_data_source(factory_name)

        # The thread utilization data source may have been started, so we
        # must clear out the list of trackers that transactions will use to add
        # thread.concurrency attributes

        from newrelic.core.thread_utilization import _utilization_trackers
        _utilization_trackers.clear()