Prometheus
Prometheus metrics extension for SQLSpec. Provides a statement observer and
configuration helpers that record SQL execution counts, duration histograms,
and row count histograms.
Observer
-
class sqlspec.extensions.prometheus.PrometheusStatementObserver[source]
Bases: object
Statement observer that records Prometheus metrics.
-
__init__(*, namespace='sqlspec', subsystem='driver', registry=None, label_names=('db_system', 'operation'), duration_buckets=None)[source]
Helpers
-
sqlspec.extensions.prometheus.enable_metrics(*, base_config=None, namespace='sqlspec', subsystem='driver', registry=None, label_names=('db_system', 'operation'), duration_buckets=None)[source]
Attach a Prometheus-backed statement observer to the provided config.
- Return type:
ObservabilityConfig