Interfaces¶
plone.observability registers all of its components through the Zope Component Architecture. Third-party packages extend or replace any of them. This page describes the interfaces; How to add a custom health check, How to add a custom metric provider, and How to add a custom metric formatter show how to register implementations.
ILivenessCheck¶
A named utility that reports whether the process is fundamentally alive.
A liveness check must not access ZODB and must not block.
Member |
Description |
|---|---|
|
The check name, reported in the |
|
Returns a |
IReadinessCheck¶
A named utility that reports whether the process can serve requests.
A readiness check may access ZODB.
Member |
Description |
|---|---|
|
The check name, reported in the |
|
Returns a |
IMetricProvider¶
An adapter on OFS.interfaces.IApplication that yields metrics.
Member |
Description |
|---|---|
|
The provider name, used for registration. |
|
Default scope for the provider’s metrics, |
|
A generator yielding |
IMetricFormatter¶
A named utility that serializes metrics to a wire format.
Member |
Description |
|---|---|
|
The MIME type of the produced output. |
|
Returns the serialized string for an iterable of |
The formatter name is selected with the format query-string parameter on @@metrics.
Metric¶
The value object yielded by metric providers.
Field |
Description |
|---|---|
|
The metric name, for example |
|
The numeric value. |
|
The metric type: |
|
|
|
A human-readable description. |
Import it from plone.observability.metric.
start_span¶
A dependency-optional helper for opening custom trace spans.
It is a no-op when the opentelemetry extra is not installed.
See Tracing.