Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.5.0 instead.

plain.cloud

Production observability via OTLP export to Plain Cloud.

Overview

You can use plain.cloud to export traces and metrics from your Plain app to Plain Cloud. The framework already instruments itself with OpenTelemetry spans and histograms — plain.cloud activates them by providing the OTLP exporters.

Set one environment variable and your app starts pushing telemetry:

PLAIN_CLOUD_EXPORT_TOKEN=your-token

If CLOUD_EXPORT_TOKEN is not set, the package is a no-op — safe to install without configuration.

Settings

Setting Default Description
CLOUD_EXPORT_URL "https://plainframework.com/otel" OTLP ingest endpoint (override to use a custom endpoint)
CLOUD_EXPORT_TOKEN "" Auth token for the export endpoint
CLOUD_TRACE_SAMPLE_RATE 1.0 Probability of exporting a trace (0.0–1.0)

All settings can be set via PLAIN_-prefixed environment variables or in app/settings.py.

Sampling

By default, all traces are exported. To reduce volume, set a sample rate:

CLOUD_TRACE_SAMPLE_RATE = 0.1  # Export 10% of traces

Metrics are not affected by sampling — histograms aggregate in-process and export periodically regardless of the trace sample rate.

What gets exported

Traces — HTTP request spans and database query spans instrumented by the framework.

Metrics — OTel histograms like db.client.query.duration, aggregated and pushed every 60 seconds.

Observer coexistence

If plain.observer is also installed, both work simultaneously. plain.cloud handles production export while observer provides the local dev toolbar and admin trace viewer. Observer detects the existing TracerProvider and layers its sampler and span processor on top.

FAQs

Do I need plain.observer to use plain.cloud?

No. plain.cloud works independently. Observer is for local dev tooling; plain.cloud is for production export.

What happens if the export endpoint is unreachable?

The OTLP exporters batch and retry automatically. If the endpoint is down, telemetry is dropped after retries — it does not block your application.

Does this add latency to requests?

No. Trace spans are exported in a background thread via BatchSpanProcessor. Metrics are flushed periodically by a background thread. Neither blocks request handling.

Installation

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

Place plain.cloud before plain.observer in INSTALLED_PACKAGES so it sets up the TracerProvider first.

Metadata

Release files for plain.cloud 0.1.5

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

Source distribution (sdist)

Source distribution for plain.cloud 0.1.5
File Size Uploaded Provenance Actions
plain_cloud-0.1.5.tar.gz 5.0 kB Without provenance Details for plain_cloud-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plain.cloud 0.1.5
File Interpreter ABI Platform Actions
plain_cloud-0.1.5-py3-none-any.whl Python 3 none any Details for plain_cloud-0.1.5-py3-none-any.whl

Total release size: 13.0 kB

Release files / plain_cloud-0.1.5.tar.gz

Download URL plain_cloud-0.1.5.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8a92088991086b6b7c2525e354d60086e013d85a128118ae3d7a3a45d686e026
BLAKE2b-256 checksum
How to use checksums
ee2bd6886687486b5a64ee055c938522bb4a69302a71a64f8c94906244552dfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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 / plain_cloud-0.1.5-py3-none-any.whl

Download URL plain_cloud-0.1.5-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ebfbe139672b1197a3a145ea9243ff4d27157dcdc0ef10ae4845fb3e1743cb0
BLAKE2b-256 checksum
How to use checksums
e954570267ecb161ccc87890f6f21158b561657688ef1bdddb49b86357bbdd17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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 plain.cloud 0.1.5

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