From b8d775e3d6bc15c8e3baa055c64dd2f714d9891f Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Fri, 19 May 2023 09:19:19 -0600 Subject: enable telemetry --- .github/workflows/ci.yml | 2 +- main.py | 9 ++++++ poetry.lock | 82 +++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 4 files changed, 92 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04d541f..85a0892 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: python-version: "3.9" - name: Package for Windows run: | - pip install pyinstaller pandas xlrd openpyxl Pillow matplotlib sv-ttk ttkwidgets + pip install pyinstaller pandas xlrd openpyxl Pillow matplotlib sv-ttk ttkwidgets sentry-sdk pyinstaller --add-data "assets;assets" --onefile -c --noconfirm --collect-data sv_ttk main.py - uses: actions/upload-artifact@v3 with: diff --git a/main.py b/main.py index e022f18..f8a87a2 100644 --- a/main.py +++ b/main.py @@ -237,6 +237,15 @@ class CompanySelector: self.master.quit() if __name__ == "__main__": + import sentry_sdk + sentry_sdk.init( + dsn="https://c5822e9079a54ef2b28d4e93a11ebc86@o126149.ingest.sentry.io/4505211315617792", + + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for performance monitoring. + # We recommend adjusting this value in production. + traces_sample_rate=1.0 + ) root = tk.Tk() app = CompanySelector(root) if os.name != "posix": diff --git a/poetry.lock b/poetry.lock index 17e9a20..d42d2ed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6,6 +6,14 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "certifi" +version = "2023.5.7" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" + [[package]] name = "contourpy" version = "1.0.7" @@ -270,6 +278,48 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "sentry-sdk" +version = "1.23.1" +description = "Python client for Sentry (https://sentry.io)" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +certifi = "*" +urllib3 = [ + {version = "<2.0.0", markers = "python_version < \"3.6\""}, + {version = ">=1.26.11", markers = "python_version >= \"3.6\""}, +] + +[package.extras] +aiohttp = ["aiohttp (>=3.5)"] +arq = ["arq (>=0.23)"] +beam = ["apache-beam (>=2.12)"] +bottle = ["bottle (>=0.12.13)"] +celery = ["celery (>=3)"] +chalice = ["chalice (>=1.16.0)"] +django = ["django (>=1.8)"] +falcon = ["falcon (>=1.4)"] +fastapi = ["fastapi (>=0.79.0)"] +flask = ["flask (>=0.11)", "blinker (>=1.1)", "markupsafe"] +grpcio = ["grpcio (>=1.21.1)"] +httpx = ["httpx (>=0.16.0)"] +huey = ["huey (>=2)"] +loguru = ["loguru (>=0.5)"] +opentelemetry = ["opentelemetry-distro (>=0.35b0)"] +pure_eval = ["pure-eval", "executing", "asttokens"] +pymongo = ["pymongo (>=3.1)"] +pyspark = ["pyspark (>=2.4.4)"] +quart = ["quart (>=0.16.1)", "blinker (>=1.1)"] +rq = ["rq (>=0.6)"] +sanic = ["sanic (>=0.8)"] +sqlalchemy = ["sqlalchemy (>=1.2)"] +starlette = ["starlette (>=0.19.1)"] +starlite = ["starlite (>=1.48)"] +tornado = ["tornado (>=5)"] + [[package]] name = "setuptools-scm" version = "7.1.0" @@ -338,6 +388,33 @@ category = "main" optional = false python-versions = ">=2" +[[package]] +name = "urllib3" +version = "1.26.15" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[package.extras] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "urllib3" +version = "2.0.2" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + [[package]] name = "xlrd" version = "2.0.1" @@ -366,10 +443,11 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-co [metadata] lock-version = "1.1" python-versions = ">=3.9,<3.12" -content-hash = "4131f9d85eea1c168c6737c28050f61d9b759ae94cffdbb1bbbf35eca19a6cf4" +content-hash = "4361bea3f63aca4de615c1da392d4fb7df89aa51b1f1e4636a01bd6ed50f5efa" [metadata.files] altgraph = [] +certifi = [] contourpy = [] cycler = [] et-xmlfile = [] @@ -390,6 +468,7 @@ pyparsing = [] python-dateutil = [] pytz = [] pywin32-ctypes = [] +sentry-sdk = [] setuptools-scm = [] six = [] sv-ttk = [] @@ -397,5 +476,6 @@ tomli = [] ttkwidgets = [] typing-extensions = [] tzdata = [] +urllib3 = [] xlrd = [] zipp = [] diff --git a/pyproject.toml b/pyproject.toml index 1ff03c8..26687c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ matplotlib = "^3.7.1" pyinstaller = "^5.11.0" sv-ttk = "^2.4.5" ttkwidgets = "^0.13.0" +sentry-sdk = "^1.23.1" [tool.poetry.dev-dependencies] -- cgit v1.2.3