Skip to main content

plainx-sentry

Use Sentry to monitor errors and performance in your Plain application.

image

Installation

# settings.py
INSTALLED_PACKAGES = [
  # ...
  "plainx.sentry",
]

In your base.html, load sentry and include the sentry_js tag:

<!-- base.html -->
<!doctype html>
<html lang="en">
  <head>
      ...
      {% sentry_js %}
  </head>
  <body>
      ...
  </body>
</html>

To enable Sentry in production, add the SENTRY_DSN to your environment. In Heroku, for example:

heroku config:set SENTRY_DSN=<your-DSN>

User and request context

To attach user and request context to errors, add the middleware:

# settings.py
MIDDLEWARE = [
    ...
    "plain.sessions.middleware.SessionMiddleware",
    "plainx.sentry.middleware.SentryMiddleware",  # After SessionMiddleware
    ...
]

This attaches to errors:

  • User context: ID, email, username
  • Request context: URL, method, query string, headers, cookies

Email, username, headers, and cookies require SENTRY_PII_ENABLED=True (the default).

Configuration

Look at the default_settings.py for all available settings.

Error page feedback widget

In your 500.html, you can optionally use the sentry_feedback tag to show Sentry's feedback widget:

<!-- base.html -->
<!doctype html>
<html lang="en">
  <head>
      ...
      {% sentry_feedback %}
  </head>
  <body>
      ...
  </body>
</html>

image

Metadata

Release files for plainx-sentry 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plainx-sentry 0.13.0
File Size Uploaded Provenance Actions
plainx_sentry-0.13.0.tar.gz 52.0 kB Without provenance Details for plainx_sentry-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plainx-sentry 0.13.0
File Interpreter ABI Platform Actions
plainx_sentry-0.13.0-py3-none-any.whl Python 3 none any Details for plainx_sentry-0.13.0-py3-none-any.whl

Total release size: 58.3 kB

Release files / plainx_sentry-0.13.0.tar.gz

Download URL plainx_sentry-0.13.0.tar.gz
Size 52.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e8bb9b29145bdc7cf7e861c156ed1ffa6c795f82ecfcf6c4ee73473edd7effe1
BLAKE2b-256 checksum
How to use checksums
d6d24077b17bcdd43c2bd8b43d6020d8a6319aac0c4e08e08bd0d9d5fcf61ecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / plainx_sentry-0.13.0-py3-none-any.whl

Download URL plainx_sentry-0.13.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00fb5e544c0cd8930cedad89602b3df4e9216868a8000d25c6fcfa28aee8e870
BLAKE2b-256 checksum
How to use checksums
bfd06a8ca2ecb90bf37df6cb059b2fdaa7e4598fb6b5ea7906d0ce9161814176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for plainx-sentry 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page