Skip to content

Commit

Permalink
Removed error reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzeman committed Mar 4, 2018
1 parent bb6836f commit 70ce687
Show file tree
Hide file tree
Showing 59 changed files with 1 addition and 11,450 deletions.
11 changes: 1 addition & 10 deletions Tools/refresh_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@
os.path.join('shove', 'tests'),
os.path.join('tzlocal', 'test_data'),
os.path.join('websocket', 'tests'),
'tests',

os.path.join('raven', 'contrib', 'bottle'),
os.path.join('raven', 'contrib', 'celery'),
os.path.join('raven', 'contrib', 'django'),
os.path.join('raven', 'contrib', 'pylons'),
os.path.join('raven', 'contrib', 'tornado'),
os.path.join('raven', 'contrib', 'webpy'),
os.path.join('raven', 'contrib', 'zerorpc'),
os.path.join('raven', 'contrib', 'zope')
'tests'
]

DELETE_FILES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from plugin.core.libraries.constants import CONTENTS_PATH, NATIVE_DIRECTORIES, UNICODE_MAP
from plugin.core.libraries.helpers import PathHelper, StorageHelper, SystemHelper
from plugin.core.libraries.tests import LIBRARY_TESTS
from plugin.core.logger.handlers.error_reporter import ErrorReporter

import json
import logging
Expand Down Expand Up @@ -119,10 +118,6 @@ def test():
# Include versions in error reports
versions = metadata.get('versions') or {}

ErrorReporter.set_tags(dict([
('%s.version' % key, value)
for key, value in versions.items()
]))

@classmethod
def reset(cls):
Expand Down Expand Up @@ -168,20 +163,6 @@ def _read_distribution_metadata(cls):
if not distribution or not distribution.get('name'):
return

# Set distribution name tag
ErrorReporter.set_tags({
'distribution.name': distribution['name']
})

# Set distribution release tags
release = distribution.get('release')

if release and release.get('version') and release.get('branch'):
ErrorReporter.set_tags({
'distribution.version': release['version'],
'distribution.branch': release['branch']
})

return distribution

@classmethod
Expand All @@ -197,29 +178,17 @@ def _libraries_path(cls, cache=False):

if libraries_path and os.path.exists(libraries_path):
log.info('Using libraries at %r', StorageHelper.to_relative_path(libraries_path))
ErrorReporter.set_tags({
'libraries.source': 'custom'
})
return libraries_path

# Use system libraries (if bundled libraries have been disabled in "advanced.ini")
if not Configuration.advanced['libraries'].get_boolean('bundled', True):
log.info('Bundled libraries have been disabled, using system libraries')
ErrorReporter.set_tags({
'libraries.source': 'system'
})
return None

# Cache libraries (if enabled)
if cache:
ErrorReporter.set_tags({
'libraries.source': 'cache'
})
return cls._cache_libraries()

ErrorReporter.set_tags({
'libraries.source': 'bundle'
})
return Environment.path.libraries

@classmethod
Expand Down Expand Up @@ -329,13 +298,6 @@ def _insert_paths_unix(libraries_path, system, architecture):
if page_size:
PathHelper.insert(libraries_path, system, architecture, '%s_%s' % (cpu_type, page_size), ucs)

# Include attributes in error reports
ErrorReporter.set_tags({
'cpu.type': cpu_type,
'memory.page_size': page_size,
'python.ucs': ucs
})

@staticmethod
def _insert_paths_windows(libraries_path, system, architecture):
vcr = SystemHelper.vcr_version() or 'vc12' # Assume "vc12" if call fails
Expand All @@ -349,9 +311,3 @@ def _insert_paths_windows(libraries_path, system, architecture):
# UCS libraries
if ucs:
PathHelper.insert(libraries_path, system, architecture, vcr, ucs)

# Include attributes in error reports
ErrorReporter.set_tags({
'python.ucs': ucs,
'vcr.version': vcr
})
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ def on_success(cls, metadata):
else:
log.debug('Using standard SSL library (ssl)')

# Enable secure error reporting
from plugin.core.logger.handlers.error_reporter import ErrorReporter
ErrorReporter.set_protocol('threaded+requests+https')

#
# Helpers
#
Expand Down
Loading

0 comments on commit 70ce687

Please sign in to comment.