Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cloud_pipelines_backend/orchestrator_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from . import component_structures as structures
from .launchers import common_annotations
from .launchers import interfaces as launcher_interfaces
from .instrumentation import bugsnag_instrumentation
from .instrumentation import contextual_logging
from .instrumentation import metrics as app_metrics

Expand Down Expand Up @@ -1055,6 +1056,7 @@ def _retry(

def record_system_error_exception(execution: bts.ExecutionNode, exception: Exception):
app_metrics.execution_system_errors.add(1)
bugsnag_instrumentation.notify(exception=exception, execution_id=str(execution.id))

if execution.extra_data is None:
execution.extra_data = {}
Expand Down
8 changes: 7 additions & 1 deletion orchestrator_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy import orm

from cloud_pipelines_backend import orchestrator_sql
from cloud_pipelines_backend.instrumentation import bugsnag_instrumentation
from cloud_pipelines_backend.launchers import kubernetes_launchers
from cloud_pipelines.orchestration.storage_providers import local_storage

Expand All @@ -32,6 +33,7 @@ def main():
logger.addHandler(stderr_handler)

logger.info("Starting the orchestrator")
bugsnag_instrumentation.setup(service_name="tangle-orchestrator")

DEFAULT_DATABASE_URI = "sqlite:///db.sqlite"
database_uri = os.environ.get("DATABASE_URI", DEFAULT_DATABASE_URI)
Expand Down Expand Up @@ -77,7 +79,11 @@ def main():
default_task_annotations=default_task_annotations,
sleep_seconds_between_queue_sweeps=5.0,
)
orchestrator.run_loop()
try:
orchestrator.run_loop()
except Exception as exc:
bugsnag_instrumentation.notify(exception=exc)
raise


if __name__ == "__main__":
Expand Down