Skip to content
Merged
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
3 changes: 3 additions & 0 deletions changelog.d/20251201_092825_rra_DM_52929.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### New features

- Add support for reporting errors to Sentry in the frontend. Sentry support is not enabled in the workers for now since they run on a different Python stack and do not necessarily have Safir.
5 changes: 5 additions & 0 deletions src/vocutouts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@
from safir.logging import Profile, configure_logging, configure_uvicorn_logging
from safir.middleware.x_forwarded import XForwardedMiddleware
from safir.models import ErrorModel
from safir.sentry import initialize_sentry
from safir.slack.webhook import SlackRouteErrorHandler

from . import __version__
from .config import config, uws
from .handlers import external, internal

__all__ = ["app"]


initialize_sentry(release=__version__)


@asynccontextmanager
async def _lifespan(app: FastAPI) -> AsyncGenerator[None]:
"""Set up and tear down the application."""
Expand Down
4 changes: 4 additions & 0 deletions src/vocutouts/workers/uws.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

import structlog
from safir.logging import configure_logging
from safir.sentry import initialize_sentry

from .. import __version__
from ..config import config, uws

__all__ = ["WorkerSettings"]


initialize_sentry(release=__version__)

configure_logging(
name="vocutouts", profile=config.log_profile, log_level=config.log_level
)
Expand Down