structlog-sentry
Sentry integration for structlog
Decision gist · record as of 2026-08-14
Yes, if you already use both structlog and Sentry. It eliminates boilerplate and keeps error tracking in sync with your structured logging. The low install friction and permissive license make it a straightforward addition. Dormant maintenance is a minor concern—the package is stable and the last commit is recent—but monitor for breaking changes in structlog or sentry-sdk if you adopt it for a new project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires structlog and sentry-sdk to be installed; SentryProcessor must be placed after add_log_level in the processor chain.
- Low friction: pure Python wheel with only two runtime dependencies (sentry-sdk and structlog).
- Maintenance is dormant—last release was 640 days ago, but the repo remains active with a recent commit on 2025-02-18 and no archived status.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2024-11-12 (640 days) · last repo commit 2025-02-18 · 139 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,431,244 downloads/mo, #2,303 on PyPI
Alternatives
Verify before relying
pip install structlog-sentry
import logging
import sentry_sdk
import structlog
from structlog_sentry import SentryProcessor
sentry_sdk.init()
structlog.configure(
processors=[
structlog.stdlib.add_log_level,
SentryProcessor(event_level=logging.ERROR),
],
logger_factory=structlog.stdlib.LoggerFactory(),
wrapper_class=structlog.stdlib.BoundLogger,
)
log = structlog.get_logger()
log.error("error message")- Whether dormant maintenance (640 days since release) poses a risk for future Python or dependency updates.
- Performance impact of automatic Sentry event capture on high-volume logging workloads.
- Whether custom fields passed to log calls are reliably sent as Sentry context or tags.
What it is and what it does
structlog-sentry is a processor plugin that integrates the Sentry error tracking service with structlog's structured logging framework. It automatically captures log events at configurable severity levels and sends them to Sentry as either breadcrumbs (for lower-severity logs) or full events (for errors and above). The processor sits in structlog's processing pipeline and converts structured log data—including exception info, custom fields, and metadata—into Sentry's event format, with options to tag events, filter specific loggers, and control what context is sent.
You configure it by adding SentryProcessor to your structlog pipeline after the log-level processor, then log normally with structlog; any logs meeting the event_level threshold automatically appear in Sentry. It supports exception capture, custom tags from log fields, breadcrumb filtering, and per-call opt-out via sentry_skip=True. The package is designed for applications already using both structlog and Sentry, eliminating the need to maintain separate instrumentation for each.
Use it for
- Capture application errors logged via structlog and surface them in Sentry's dashboard without duplicating logging calls.
- Send structured context from logs as Sentry tags and breadcrumbs for better error correlation.
- Automatically report exceptions with sys.exc_info() to Sentry when you call log.error() in exception handlers.
- Filter out noisy loggers or skip Sentry reporting for specific log calls while keeping them in local logs.
- Integrate structlog JSON output with Sentry for centralized error tracking in monitoring stacks.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you already use both structlog and Sentry.
It eliminates boilerplate and keeps error tracking in sync with your structured logging. The low install friction and permissive license make it a straightforward addition. Dormant maintenance is a minor concern—the package is stable and the last commit is recent—but monitor for breaking changes in structlog or sentry-sdk if you adopt it for a new project.
Install
structlog-sentry on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (sentry-sdk and structlog). Maintenance is dormant—last release was 640 days ago, but the repo remains active with a recent commit on 2025-02-18 and no archived status.
Requires structlog and sentry-sdk to be installed; SentryProcessor must be placed after add_log_level in the processor chain.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install structlog-sentry
import logging
import sentry_sdk
import structlog
from structlog_sentry import SentryProcessor
sentry_sdk.init()
structlog.configure(
processors=[
structlog.stdlib.add_log_level,
SentryProcessor(event_level=logging.ERROR),
],
logger_factory=structlog.stdlib.LoggerFactory(),
wrapper_class=structlog.stdlib.BoundLogger,
)
log = structlog.get_logger()
log.error("error message")
Verify before relying
- Whether dormant maintenance (640 days since release) poses a risk for future Python or dependency updates.
- Performance impact of automatic Sentry event capture on high-volume logging workloads.
- Whether custom fields passed to log calls are reliably sent as Sentry context or tags.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagessentry-sdkstructlog |
| Maintenance | Dormant 640 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,431,244 / month, #2,303 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: structlog_sentry-2.2.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “structlog sentry integration”
- structlog-sentryBridges structlog and Sentry to automatically capture structured logs…
- safe-initSafe Init wraps AWS Lambda handlers to provide automatic error…
- ravenRaven is a legacy Python client for Sentry that captures and reports…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also django-structlog · eliot · structlog-gcp · structlog-pretty · pytest-structlog · structlog · macwinnie-enhanced-logging · sentry-sdk · sentry-cli · raven