Hi guys,
As a follow-up to my old post (Deploy Sentry through CloudFormation using only AWS services), I’ve also went ahead and created an integration for Python which allows you to view your application logs, both in CONSOLE and in SENTRY (as breadcrumbs).
This allows you to easily debug your Sentry errors as you will have all your relevant application logs appended to the Sentry exception - aka “all in one place”.
The integration works just for Python and has been tested against:
- AWS Lambda
- AWS Fargate
- local development
It uses the structlog library to generate the logs and the sentry_sdk to push the breadcrumbs.
Giving credit where credit is due, the integration would not have been possible without the initial work of @TeoZosa and his own work here > GitHub - TeoZosa/structlog-sentry-logger: A multi-purpose, pre-configured, performance-optimized structlog logger with (optional) Sentry integration via structlog-sentry
Without further ado, here are the useful links:
- PYPI PACKAGE = structlog-sentry-lambda · PyPI
- GITHUB REPO = GitHub - Rungutan/structlog-sentry-lambda: An AWS approved version of https://github.com/TeoZosa/structlog-sentry-logger which is compatible to AWS Lambda as well as AWS Fargate
PRs are more than welcome, of course.