Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plainx_sentry-0.13.0.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plainx_sentry-0.13.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file plainx_sentry-0.13.0.tar.gz.

File metadata

  • Download URL: plainx_sentry-0.13.0.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for plainx_sentry-0.13.0.tar.gz
Algorithm Hash digest
SHA256 e8bb9b29145bdc7cf7e861c156ed1ffa6c795f82ecfcf6c4ee73473edd7effe1
MD5 317567677ab9f8430c05c8dc21b85e39
BLAKE2b-256 d6d24077b17bcdd43c2bd8b43d6020d8a6319aac0c4e08e08bd0d9d5fcf61ecf

See more details on using hashes here.

File details

Details for the file plainx_sentry-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: plainx_sentry-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for plainx_sentry-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00fb5e544c0cd8930cedad89602b3df4e9216868a8000d25c6fcfa28aee8e870
MD5 b717f16296845145b4b8727d9deaec85
BLAKE2b-256 bfd06a8ca2ecb90bf37df6cb059b2fdaa7e4598fb6b5ea7906d0ce9161814176

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page