1from plain.runtime import Secret
2
3CONNECT_EXPORT_ENABLED: bool = True # Set to False to disable all OTEL reporting
4CONNECT_EXPORT_URL: str = "https://ingest.plainframework.com"
5# Base URL of the Plain Cloud web app. Used to build links back into the
6# platform — the `/t/<trace_id>` trace short URL in the toolbar and the
7# `/forms/<endpoint_id>` support submission URL.
8CONNECT_CLOUD_URL: str = "https://plainframework.com"
9CONNECT_EXPORT_TOKEN: Secret[str] = "" # Auth token for the export endpoint
10CONNECT_TRACE_SAMPLE_RATE: float = 1.0 # 0.0–1.0, probability of exporting a trace
11CONNECT_EXPORT_LOGS: bool = True # Set to False to disable OTLP log export
12# Minimum severity exported via OTLP logs. Accepts a level name ("INFO",
13# "DEBUG", ...) or the integer level value.
14CONNECT_LOG_LEVEL: str = "INFO"
15
16# Shared secret with the Plain Cloud platform. One value per app, used by
17# every connect feature that needs to encrypt or sign — identity tokens for
18# pageviews, render tokens for the support widget, future inbound message
19# verification. Get the value from the App settings page on Plain Cloud.
20CONNECT_SECRET_KEY: Secret[str] = ""
21
22# Pageview tracking — injected via the {% connect_pageviews %} template tag.
23# Public endpoint token; safe to expose in page HTML.
24CONNECT_PAGEVIEWS_TOKEN: str = ""
25# Pageview ingest endpoint.
26CONNECT_PAGEVIEWS_URL: str = "https://beacon.plainframework.com"