SILENT KILLERPanel

Current Path: > > opt > alt > python38 > lib > > python3.8 > site-packages


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python38/lib//python3.8/site-packages

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
_distutils_hack Directory - -
certifi Directory - -
certifi-2018.4.16-py3.8.egg-info Directory - -
pip Directory - -
pip-22.2.1.dist-info Directory - -
pkg_resources Directory - -
sentry_sdk Directory - -
sentry_sdk-0.7.10-py3.8.egg-info Directory - -
setuptools Directory - -
setuptools-58.3.0.dist-info Directory - -
six-1.12.0-py3.8.egg-info Directory - -
urllib3 Directory - -
urllib3-1.26.6-py3.8.egg-info Directory - -
.sentry.conf File 101 bytes April 04 2025 08:02:38.
NCSentry.py File 1523 bytes March 26 2025 11:05:09.
PySocks-1.5.7-py3.8.egg-info File 322 bytes July 10 2020 11:16:53.
distutils-precedence.pth File 152 bytes November 13 2023 21:45:15.
six.py File 32452 bytes December 10 2018 00:59:34.
socks.py File 29952 bytes May 21 2016 21:54:42.
sockshandler.py File 2913 bytes May 21 2016 21:54:42.

Reading File: //opt/alt/python38/lib//python3.8/site-packages/NCSentry.py

#!/opt/alt/python38/bin/python3
import os
import sentry_sdk
import warnings


class NCSentry:

    """
    Simple Wrapper

        sentry = NCSentry()

    After successfully inited class we can use Sentry debug system:

    Report to Sentry:

        SentryClient.capture_message("test")
        SentryClient.capture_exception(Exception("MyAwsomeString"))

    """

    __conflict_under_version = "0.19.2"

    def __init__(self, config_dir=None):
        self.sentry_args = {}
        if config_dir:
            dir_path = config_dir
        else:
            dir_path = os.path.dirname(os.path.realpath(__file__))

        self.conf_path = os.path.join(dir_path, ".sentry.conf")

        self.construct_args()

        with open(self.conf_path) as fh:
            self.dsn = fh.read()
            self.client = sentry_sdk.init(self.dsn, **self.sentry_args)
            self.capture_message = sentry_sdk.capture_message
            self.capture_exception = sentry_sdk.capture_exception

    def construct_args(self):
        try:
            import pkg_resources

            _conflict_under_version = pkg_resources.extern.packaging.version.Version(
                self.__conflict_under_version
            )
            if (
                pkg_resources.get_distribution("sentry-sdk").parsed_version
                >= _conflict_under_version
            ):
                self.sentry_args["traces_sample_rate"] = 0
        except Exception as err:
            warnings.warn(f"Can't setup sentry default args {err}")

SILENT KILLER Tool