Skip to content
Snippets Groups Projects
Commit 7f0c4fb6 authored by Neda Moeini's avatar Neda Moeini
Browse files

Added sentry SDK

parent 01016f7a
No related branches found
No related tags found
No related merge requests found
"""The main entrypoint for :term:`GSO`, and the different ways in which it can be run.""" """The main entrypoint for :term:`GSO`, and the different ways in which it can be run."""
import sentry_sdk
import typer import typer
from orchestrator import OrchestratorCore, app_settings from orchestrator import OrchestratorCore, app_settings
from orchestrator.cli.main import app as cli_app from orchestrator.cli.main import app as cli_app
...@@ -15,6 +15,13 @@ from gso.graphql_api.types import GSO_SCALAR_OVERRIDES ...@@ -15,6 +15,13 @@ from gso.graphql_api.types import GSO_SCALAR_OVERRIDES
SCALAR_OVERRIDES.update(GSO_SCALAR_OVERRIDES) SCALAR_OVERRIDES.update(GSO_SCALAR_OVERRIDES)
sentry_sdk.init(
dsn="https://2b0b82245bfa6631041802c997ed8b58@test-observer01.geant.org/3",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
)
def init_gso_app() -> OrchestratorCore: def init_gso_app() -> OrchestratorCore:
"""Initialise the :term:`GSO` app.""" """Initialise the :term:`GSO` app."""
...@@ -34,7 +41,7 @@ def init_worker_app() -> OrchestratorCore: ...@@ -34,7 +41,7 @@ def init_worker_app() -> OrchestratorCore:
def init_cli_app() -> typer.Typer: def init_cli_app() -> typer.Typer:
"""Initialise :term:`GSO` as a CLI application.""" """Initialise :term:`GSO` as a CLI application."""
from gso.cli import imports, netbox # noqa: PLC0415 from gso.cli import imports, netbox
cli_app.add_typer(imports.app, name="import-cli") cli_app.add_typer(imports.app, name="import-cli")
cli_app.add_typer(netbox.app, name="netbox-cli") cli_app.add_typer(netbox.app, name="netbox-cli")
......
...@@ -7,6 +7,7 @@ celery-redbeat==2.2.0 ...@@ -7,6 +7,7 @@ celery-redbeat==2.2.0
celery==5.3.6 celery==5.3.6
azure-identity==1.16.0 azure-identity==1.16.0
msgraph-sdk==1.2.0 msgraph-sdk==1.2.0
sentry_sdk==2.11.0
# Test and linting dependencies # Test and linting dependencies
celery-stubs==0.1.3 celery-stubs==0.1.3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment