This PR extracts parts from @sentry/node's PostgresJsInstrumentation to @sentry/core and exposes it as a callable instrumentPostgresJsSql helper that can be used in SDKs that aren't based on OpenTelemetry.
It is currently exposed in @sentry/cloudflare and @sentry/deno as these two SDKs are not based on OpenTelemetry under the hood.
@sentry/node imports and reuses as much as possible from it.
Note
The pull request "Ab/postgresjs core instrumentation" was created by @andreiborza but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.
This PR extracts parts from
@sentry/node'sPostgresJsInstrumentationto@sentry/coreand exposes it as a callableinstrumentPostgresJsSqlhelper that can be used in SDKs that aren't based on OpenTelemetry.It is currently exposed in
@sentry/cloudflareand@sentry/denoas these two SDKs are not based on OpenTelemetry under the hood.@sentry/nodeimports and reuses as much as possible from it.