Exemplo n.º 1
0
    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()
Exemplo n.º 2
0
    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()