Skip to content

Conversation

@giortzisg
Copy link
Collaborator

DESCRIBE YOUR PR

adding docs for using sentrysql for db queries.

@giortzisg giortzisg requested a review from cleptric May 5, 2025 12:21
@giortzisg giortzisg self-assigned this May 5, 2025
@vercel
Copy link

vercel bot commented May 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2025 10:41am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 10:41am
develop-docs ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 10:41am

@cleptric
Copy link
Member

cleptric commented May 6, 2025

Move all instrument pages (caches, queues & database) under instrumentation.

@codecov
Copy link

codecov bot commented May 6, 2025

Bundle Report

Changes will increase total bundle size by 150 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.14MB 156 bytes (0.0%) ⬆️
sentry-docs-client-array-push 9.47MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.75MB -0.0%
../instrumentation.js -3 bytes 1.08MB -0.0%
9523.js -3 bytes 1.05MB -0.0%
../app/[[...path]]/page.js.nft.json 55 bytes 389.17kB 0.01%
../app/platform-redirect/page.js.nft.json 55 bytes 389.08kB 0.01%
../app/sitemap.xml/route.js.nft.json 55 bytes 387.05kB 0.01%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 868.7kB -0.0%
static/chunks/8165-*.js -3 bytes 410.1kB -0.0%
static/jz8ykwEeDM1_Umk3ROrEY/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/jz8ykwEeDM1_Umk3ROrEY/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/Ay1CdX0BdMvtGbkjnyvxN/_buildManifest.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
static/Ay1CdX0BdMvtGbkjnyvxN/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

```go
dsn := "postgres://postgres:password@write.postgres.internal:5432/postgres"
sql.Register("sentrysql-postgres", sentrysql.NewSentrySQL(
&pq.Driver{},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention that users should read the database driver's docs, since every database driver is different. Would be nice if we can put "This is an example for github.com/lib/pq package"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that a code comment would sometimes get overlooked by the users. However, I agree that it would be nice to add one more line in the actual documentation prompting the user to read the docs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Most of the times, I do read everything on the pkg.go.dev instead of the README or a package's any other docs site.


```go
dsn := "postgres://postgres:password@read.postgres.internal:5432/postgres"
connector, err := pq.NewConnector(dsn)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same with mentioning users should read their database driver's docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants