OpenLIT uses OpenTelemetry Auto-Instrumentation to help you monitor applications using PostgreSQL with the psycopg3 driver. This includes tracking query performance, transaction operations, connection pool metrics, and more. Auto-instrumentation means you don’t have to set up monitoring manually for different databases or query types. By simply adding OpenLIT in your application, all the necessary monitoring configurations are automatically set up. The integration is compatible withDocumentation Index
Fetch the complete documentation index at: https://docs.openlit.io/llms.txt
Use this file to discover all available pages before exploring further.
- psycopg
>= 3.0.0 - psycopg_pool (optional, for connection pool monitoring)
Supported Operations
| Operation | Description |
|---|---|
execute | Single query execution |
executemany | Batch query execution |
copy | COPY operations for bulk data transfer |
callproc | Stored procedure calls |
commit | Transaction commits |
rollback | Transaction rollbacks |
PostgreSQL-Specific Features
OpenLIT automatically detects and enriches traces with PostgreSQL-specific features:- pgvector Support: Detects vector similarity operators (
<=>,<->,<#>) and records the similarity metric (cosine, L2, inner product) - Full-Text Search: Detects
tsvector,tsquery,websearch_to_tsquery, andts_rankoperations
Get started
Initialize OpenLIT in your Application
- Python
- Typescript
- Zero Code Instrumentation
- One-Line Instrumentation
Perfect for existing applications - no code modifications needed:
- Via CLI Arguments
- Via Environment Variables
Perfect for: Legacy applications, production systems where code changes need approval, quick testing, or when you want to add observability without touching existing code.
YOUR_OTEL_ENDPOINT with the URL of your OpenTelemetry backend, such as http://127.0.0.1:4318 if you are using OpenLIT and a local OTel Collector.To send metrics and traces to other Observability tools, refer to the supported destinations.For more advanced configurations and application use cases, visit the OpenLIT Python repository or OpenLIT Typescript repository.Advanced Configuration
Database-Specific Options
OpenLIT provides additional configuration options for database instrumentation:| Parameter | Environment Variable | Description | Default |
|---|---|---|---|
capture_db_parameters | OPENLIT_CAPTURE_DB_PARAMETERS | Capture query parameters in OTel per-key format (db.query.parameter.<key>) | False |
capture_db_parameters
When enabled, query parameters are recorded as per-key span attributes following the OTel semantic conventiondb.query.parameter.<key>.
Quickstart: Database Observability
Production-ready database monitoring setup in 2 simple steps
Configuration
Configure the OpenLIT SDK according to your requirements.
Destinations
Send telemetry to Datadog, Grafana, New Relic, and other observability stacks
Zero-code observability with the OpenLIT Controller
Discover and instrument LLM traffic across Kubernetes, Docker, and Linux using eBPF — no code changes required.

