-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(go): add sql queries documentation #13594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
|
Move all instrument pages (caches, queues & database) under instrumentation. |
Bundle ReportChanges will increase total bundle size by 150 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
| ```go | ||
| dsn := "postgres://postgres:password@write.postgres.internal:5432/postgres" | ||
| sql.Register("sentrysql-postgres", sentrysql.NewSentrySQL( | ||
| &pq.Driver{}, |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
DESCRIBE YOUR PR
adding docs for using sentrysql for db queries.