Skip to content

Commit f399513

Browse files
committed
Add changelog entry
1 parent e7e5262 commit f399513

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@
66

77
### Important Changes
88

9+
- **feat(core,cloudflare,deno): Add `instrumentPostgresJsSql` instrumentation**
10+
11+
Added a new instrumentation helper for the [`postgres`](https://github.com/porsager/postgres) (postgres.js) library, designed for
12+
SDKs that are not based on OpenTelemetry (e.g. Cloudflare, Deno). This wraps a postgres.js `sql` tagged template instance so that
13+
all queries automatically create Sentry spans.
14+
15+
```javascript
16+
import postgres from 'postgres';
17+
import * as Sentry from '@sentry/cloudflare'; // or '@sentry/deno'
18+
19+
export default Sentry.withSentry(env => ({ dsn: '__DSN__' }), {
20+
async fetch(request, env, ctx) {
21+
const sql = Sentry.instrumentPostgresJsSql(postgres(env.DATABASE_URL));
22+
23+
// All queries now create Sentry spans
24+
const users = await sql`SELECT * FROM users WHERE id = ${userId}`;
25+
return Response.json(users);
26+
},
27+
});
28+
```
29+
30+
The instrumentation is available in `@sentry/core`, `@sentry/cloudflare`, and `@sentry/deno`.
31+
932
- **feat(nextjs): Add Turbopack support for `thirdPartyErrorFilterIntegration` ([#19542](https://github.com/getsentry/sentry-javascript/pull/19542))**
1033

1134
We added experimental support for the `thirdPartyErrorFilterIntegration` with Turbopack builds.

0 commit comments

Comments
 (0)