Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,29 @@

### Important Changes

- **feat(core,cloudflare,deno): Add `instrumentPostgresJsSql` instrumentation**

Added a new instrumentation helper for the [`postgres`](https://github.com/porsager/postgres) (postgres.js) library, designed for
SDKs that are not based on OpenTelemetry (e.g. Cloudflare, Deno). This wraps a postgres.js `sql` tagged template instance so that
all queries automatically create Sentry spans.

```javascript
import postgres from 'postgres';
import * as Sentry from '@sentry/cloudflare'; // or '@sentry/deno'

export default Sentry.withSentry(env => ({ dsn: '__DSN__' }), {
async fetch(request, env, ctx) {
const sql = Sentry.instrumentPostgresJsSql(postgres(env.DATABASE_URL));

// All queries now create Sentry spans
const users = await sql`SELECT * FROM users WHERE id = ${userId}`;
return Response.json(users);
},
});
```

The instrumentation is available in `@sentry/core`, `@sentry/cloudflare`, and `@sentry/deno`.

- **feat(nextjs): Add Turbopack support for `thirdPartyErrorFilterIntegration` ([#19542](https://github.com/getsentry/sentry-javascript/pull/19542))**

We added experimental support for the `thirdPartyErrorFilterIntegration` with Turbopack builds.
Expand Down
1 change: 1 addition & 0 deletions packages/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export {
moduleMetadataIntegration,
supabaseIntegration,
instrumentSupabaseClient,
instrumentPostgresJsSql,
zodErrorsIntegration,
consoleIntegration,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export { dedupeIntegration } from './integrations/dedupe';
export { extraErrorDataIntegration } from './integrations/extraerrordata';
export { rewriteFramesIntegration } from './integrations/rewriteframes';
export { supabaseIntegration, instrumentSupabaseClient } from './integrations/supabase';
export { instrumentPostgresJsSql } from './integrations/postgresjs';
export { zodErrorsIntegration } from './integrations/zoderrors';
export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter';
export { consoleIntegration } from './integrations/console';
Expand Down
Loading
Loading