Skip to main content

On-page telemetry and observability tools for Plain.

Project description

plain.observer

On-page telemetry and observability tools for Plain.

Installation

Install the plain.observer package from PyPI:

uv add plain.observer

Add plain.observer to your INSTALLED_PACKAGES:

# app/settings.py
INSTALLED_PACKAGES = [
    # ...
    "plain.observer",
]

Include the observer URLs in your URL configuration:

# app/urls.py
from plain.observer.urls import ObserverRouter
from plain.urls import Router, include

class AppRouter(Router):
    namespace = ""
    urls = [
        # ...
        include("observer/", ObserverRouter),
    ]

Run migrations to create the necessary database tables:

plain migrate

After installation, Observer will automatically integrate with your application's toolbar (if using plain.admin). You can access the web interface at /observer/traces/ or use the CLI commands to analyze traces.

Content Security Policy (CSP)

If you're using a Content Security Policy (CSP), the Observer toolbar panel requires frame-ancestors 'self' to display trace information in an iframe.

Without this directive, the toolbar panel will fail to load with a CSP error: "Refused to frame... because an ancestor violates the following Content Security Policy directive: 'frame-ancestors 'none'".

Example CSP configuration:

DEFAULT_RESPONSE_HEADERS = {
    "Content-Security-Policy": (
        "default-src 'self'; "
        "script-src 'self' 'nonce-{request.csp_nonce}'; "
        "style-src 'self' 'nonce-{request.csp_nonce}'; "
        "frame-ancestors 'self'; "  # Required for Observer toolbar
        # ... other directives
    ),
}

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

plain_observer-0.16.0.tar.gz (37.8 kB view details)

Uploaded Source

Built Distribution

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

plain_observer-0.16.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file plain_observer-0.16.0.tar.gz.

File metadata

  • Download URL: plain_observer-0.16.0.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"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 plain_observer-0.16.0.tar.gz
Algorithm Hash digest
SHA256 495f7d81a4335e569ac04d63fc92c04d0a4b477105e86d05fbf7d252ec066164
MD5 8d560bd7d6dcfe9b83767ed0e95cd6fd
BLAKE2b-256 0df1dac9dfe7d1012ea04387e5f8bcf15b3d32b3c83cb0d9b66ba7e33530dd95

See more details on using hashes here.

File details

Details for the file plain_observer-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: plain_observer-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"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 plain_observer-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f70d793f907d55a557d643b706504e5ac074747488d6e8f3a6dbd99875ed3881
MD5 874eac40d795754bae93e1275a98d5b9
BLAKE2b-256 a675435ba138fecabdb2188c1da5fad8847088c0cf5e263fd95d2ed0fa4d52fd

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