File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments