Skip to content
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

feat: document how tracing and metrics works for driver adapters #6079

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

janpio
Copy link
Contributor

@janpio janpio commented Jun 8, 2024

Note: Only merge as final step of https://github.com/prisma/team-orm/issues/1187

Copy link
Contributor

github-actions bot commented Jun 8, 2024

Absolute URL check

No absolute URLs to prisma.io/docs found.

@janpio janpio changed the title Janpio/driver-adapters-tracing-and-metrics feat: document how tracing and metrics works for driver adapters Jun 8, 2024
Copy link
Contributor

github-actions bot commented Jun 8, 2024

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

Comment on lines 49 to 56
When using a [driver adapter](/orm/overview/databases/database-drivers#driver-adapters), the following metrics are not available as the connetion management and the connection pool is handled by the external database driver itself:

- `prisma_pool_connections_closed_total`
- `prisma_pool_connections_opened_total`
- `prisma_pool_connections_open`
- `prisma_pool_connections_busy`
- `prisma_pool_connections_idle`
- `prisma_client_queries_wait_histogram_ms`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

metrics that are not available for driver adapters

Comment on lines 78 to 83
- `prisma:client:operation`
- `prisma:client:serialize`
- `prisma:engine`
- `prisma:engine:db_query`: details of the first SQL query or command...
- `prisma:engine:db_query`: ...details of the next SQL query or command...
- `prisma:engine:serialize`
Copy link
Contributor Author

@janpio janpio Jun 8, 2024

Choose a reason for hiding this comment

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

adapted trace spans for driver adapters

- `prisma:engine:db_query`: ...details of the next SQL query or command...
- `prisma:engine:serialize`

Note the missing spans for `prisma:client:connect` and `prisma:engine:connection`. `prisma:engine:db_query` might also be tracking a slightly different stage of query execution.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missing tracing spans for driver adapters

@janpio janpio self-assigned this Jun 8, 2024
Copy link

cloudflare-pages bot commented Jun 8, 2024

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: ca26588
Status: ✅  Deploy successful!
Preview URL: https://3a344e93.docs-51g.pages.dev
Branch Preview URL: https://janpio-driver-adapters-traci.docs-51g.pages.dev

View logs

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.

None yet

1 participant