$12 GRAYBYTE WORDPRESS FILE MANAGER $47

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python38/lib/python3.8/site-packages/

HOME
Current 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}")


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
23 Sep 2024 11.26 AM
root / linksafe
0755
__pycache__
--
4 Apr 2025 9.00 AM
root / linksafe
0755
_distutils_hack
--
3 Mar 2024 10.48 PM
root / root
0755
certifi
--
21 Mar 2024 10.24 AM
root / linksafe
0755
certifi-2018.4.16-py3.8.egg-info
--
21 Mar 2024 10.24 AM
root / linksafe
0755
pip
--
3 Mar 2024 10.49 PM
root / linksafe
0755
pip-22.2.1.dist-info
--
3 Mar 2024 10.49 PM
root / linksafe
0755
pkg_resources
--
3 Mar 2024 10.48 PM
root / linksafe
0755
sentry_sdk
--
21 Mar 2024 10.24 AM
root / linksafe
0755
sentry_sdk-0.7.10-py3.8.egg-info
--
21 Mar 2024 10.24 AM
root / linksafe
0755
setuptools
--
3 Mar 2024 10.48 PM
root / linksafe
0755
setuptools-58.3.0.dist-info
--
3 Mar 2024 10.48 PM
root / linksafe
0755
six-1.12.0-py3.8.egg-info
--
21 Mar 2024 10.24 AM
root / linksafe
0755
urllib3
--
13 Aug 2024 8.31 AM
root / linksafe
0755
urllib3-1.26.6-py3.8.egg-info
--
13 Aug 2024 8.31 AM
root / linksafe
0755
.sentry.conf
0.099 KB
4 Apr 2025 8.03 AM
root / root
0600
NCSentry.py
1.487 KB
26 Mar 2025 11.05 AM
root / root
0644
PySocks-1.5.7-py3.8.egg-info
0.314 KB
10 Jul 2020 11.16 AM
root / linksafe
0644
distutils-precedence.pth
0.148 KB
13 Nov 2023 9.45 PM
root / linksafe
0644
six.py
31.691 KB
10 Dec 2018 12.59 AM
root / linksafe
0644
socks.py
29.25 KB
21 May 2016 9.54 PM
root / linksafe
0644
sockshandler.py
2.845 KB
21 May 2016 9.54 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF