Configuration#
All configuration is done through environment variables. This page is the canonical list. Every how-to guide links here rather than repeating these values.
Health server#
PLONE_OBSERVABILITY_HEALTH_HOSTBind address for the health probe server. Default:
0.0.0.0.PLONE_OBSERVABILITY_HEALTH_PORTPort for the health probe server. Default:
8081. Set to0to disable the health server.PLONE_OBSERVABILITY_READINESS_CACHE_TTLSeconds to reuse the result of a readiness run, successful or not, for
/readyand/startup. A burst of probes then costs one run. Set to0to run the checks on every probe, unless a run is already in progress. Default:2.PLONE_OBSERVABILITY_READINESS_STUCK_AFTERSeconds after which a readiness run that has not returned counts as stuck. Until then, probes that arrive during the run get the last result. After that they get
503with amessage, and a warning is logged once. Default:10.
Metrics#
PLONE_OBSERVABILITY_METRICS_ALLOWLISTComma-separated CIDRs allowed to access
@@metrics. Default: empty, which allows all IP addresses.PLONE_OBSERVABILITY_TRUSTED_PROXIESComma-separated CIDRs of trusted reverse proxies, used to resolve the client address from
X-Forwarded-For. Default:127.0.0.1,::1.PLONE_OBSERVABILITY_METRICS_CACHE_TTLSeconds to cache the expensive-to-collect metrics: the content catalog counts, the database-wide ZODB gauges (
plone_zodb_object_count,plone_zodb_db_size_bytes), and theplone_malloc_*metrics. Default:60.PLONE_OBSERVABILITY_MALLINFOCollect the
plone_malloc_*metrics from glibc’smallinfo2(). The call holds the allocator lock while it walks every free memory chunk. On a heap fragmented into a million free chunks, it takes about 100 milliseconds. Threads that allocate memory wait meanwhile. When jemalloc replacesmalloc, this setting has no effect, and theplone_jemalloc_*metrics are reported without it. Set to1to enable. Default:0.PLONE_OBSERVABILITY_REQUEST_RSSRead the resident set size before and after each request and each tile subrequest. Enables the
plone_request_rss_growth_byteshistogram, the warning below, and theplone.process.rss_*span attributes. It needs/proc/self/statm(Linux). Set to1to enable. Default:0.PLONE_OBSERVABILITY_REQUEST_RSS_WARN_MIBRSS growth of a single request, in MiB, that logs a warning with the request method and path. The query string is left out. Set to
0to disable the warning. Applies only whenPLONE_OBSERVABILITY_REQUEST_RSSis enabled. Default:20.PLONE_OBSERVABILITY_ZODB_ACTIVITY_MONITORInstall a minimal ZODB activity monitor for the load and store counters. Set to
0to disable. Default:1.
OpenTelemetry tracing#
These variables apply only when the opentelemetry extra is installed.
The standard OTEL_* variables are honored directly.
The list below names them for convenience, alongside the package-specific overrides.
OTEL_EXPORTER_OTLP_ENDPOINTOTLP collector endpoint. Setting it enables tracing.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTOTLP collector endpoint for spans only. Setting it enables tracing.
OTEL_EXPORTER_OTLP_PROTOCOLTransport for the OTLP exporter:
grpcorhttp/protobuf.OTEL_EXPORTER_OTLP_TRACES_PROTOCOLtakes precedence for spans. Any other value logs a warning once and falls back togrpc. Default:grpc.OTEL_SERVICE_NAMEService name reported on emitted spans.
OTEL_TRACES_SAMPLERSampling strategy.
OTEL_PYTHON_WSGI_EXCLUDED_URLSComma-separated regexes of paths to never trace, matched as a substring search against the path. Falls back to
OTEL_PYTHON_EXCLUDED_URLS.PLONE_OBSERVABILITY_OTEL_ENABLEDMaster on/off override. Accepts
1or0.PLONE_OBSERVABILITY_OTEL_EXCLUDE_DEFAULTSDefault-exclude the package’s own
@@metricsscrape from tracing. Accepts1or0. Default:1.PLONE_OBSERVABILITY_OTEL_INSTRUMENTORSEnable the optional external-I/O instrumentors (botocore, requests, urllib3, httpx, psycopg). Each activates only when both the instrumentation package (
opentelemetry-io/opentelemetry-dbextras) and the instrumented library are installed. Accepts1or0. Default:0.PLONE_OBSERVABILITY_OTEL_RENDEREmit the render spans for viewlet managers, viewlets, portlet columns, and portlets. Accepts
1or0. Default:1.PLONE_OBSERVABILITY_OTEL_USER_IDInclude
enduser.idon spans. This is personally identifiable information. It is off by default.
See also
About health probes explains why the health server runs on a separate port, and How to install plone.observability shows how to wire the WSGI filters that activate metrics and tracing.