Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 1.58 KB

File metadata and controls

64 lines (49 loc) · 1.58 KB
title Postgres
description Adds instrumentation for Postgres. (default)
supported
javascript.node
javascript.aws-lambda
javascript.azure-functions
javascript.connect
javascript.express
javascript.fastify
javascript.gcp-functions
javascript.hapi
javascript.hono
javascript.koa
javascript.nestjs
javascript.electron
javascript.nextjs
javascript.nuxt
javascript.solidstart
javascript.sveltekit
javascript.remix
javascript.react-router
javascript.astro
javascript.bun
javascript.tanstackstart-react

This integration only works in the Node.js and Bun runtimes.

Import name: Sentry.postgresIntegration

This integration is enabled by default when performance monitoring is enabled. If you'd like to modify your default integrations, read this.

The postgresIntegration adds instrumentation for the pg library to capture spans using @opentelemetry/instrumentation-pg.

Sentry.init({
  integrations: [Sentry.postgresIntegration()],
});

Options

ignoreConnectSpans

Type: boolean

Available since: 10.40.0

When true, the integration does not create spans for pg.connect or pg.pool.connect calls. Use this to reduce trace noise when connection setup is not useful to monitor. Default is false.

Sentry.init({
  integrations: [Sentry.postgresIntegration({ ignoreConnectSpans: true })],
});

Supported Versions

  • pg: >=8 <9