AWS X-Ray SDK for Postgres
JSON →aws-xray-sdk-postgres is the official AWS X-Ray patcher for Postgres (pg) Node.js driver, version 3.12.0. It automatically records SQL queries, request/response data, and errors as subsegments under the X-Ray trace. Compatible with Postgres 6.1.0+. Requires aws-xray-sdk-core as a peer dependency. Supports both automatic (via cls-hooked) and manual segment tracking. Ships TypeScript definitions. Maintenance is tied to the SDK core; release cadence is periodic alongside core updates. Key differentiator: seamless integration with AWS X-Ray for tracing database calls with minimal code changes.
Resources
packageaws-xray-sdk-postgres ↗
API endpoints
full doc /v1/registry/aws-xray-sdk-postgres