-
Notifications
You must be signed in to change notification settings - Fork 174
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
DB metrics: add query-level metrics #723
Comments
related to #512 |
@trask Any objections to me putting up a PR for this, or is this being actively discussed by the DB Client working group? I did see there was some discussion around common DB attributes, which I imagine might be relevant for these metrics as well (i.e, do we create common query metrics conventions like the examples I gave, or database-specific query metrics). |
@dnaik-sfx does #735 address your needs? |
We'd like to be able to collect database metrics like duration, count, rows returned, etc... at the query/statement level. That PR does add a new metric on duration, but it seems that I realize there are concerns about the high cardinality when adding |
@trask Sorry to bother you again, but is this (or related topics) being, or planned to be, discussed by the working group? And if so, is there somewhere I can go to follow the discussion (if not here)? Also happy to put up a PR for this myself and help drive it if this would be beyond the scope of what the working group was intended to accomplish. |
hey @dnaik-sfx, sorry for the slow response, this issue is on the working group's project board, we are planning to discuss it prior to stabilization, but we may push it post stabilization if we think it can be added after stabilization without introducing any breaking changes a couple thoughts/questions in the meantime... would you still want these two:
if I could see for |
Hi @trask , thanks for responding. Since we just learned there's an upcoming change to add If the answer is yes, we could be adding more metrics in the I feel pretty confident that there's no reason why we cannot go with |
@seonsfx |
Moving this to post-stability since we can add new metrics later, but we can continue discussing and clarifying the issue in the meantime. |
@trask thanks! What does the current timeline look like for stability? Wondering what the timeframe might look like for these query-level metric conventions to go in. Given the
Some of these are kind of specific to a given type of database, but it could still be worth capturing them as a shared convention in case smaller or future technologies share the underlying concepts. Open to feedback about where these conventions should be added though. As far as collection goes, we envision typically collecting them from system tables depending on the database implementation. For example, MySQL has the Performance Schema with tables providing statistics about queries that ran in the past. I'm happy to put up a PR for these metrics, as well as the attributes that would be desired on them, to discuss specifics and in further depth. |
@trask I know work towards stability is still ongoing, but any thoughts about the metrics and collection method I listed above and any possible conflicts with patterns/metrics being added now? |
Put up a PR for the sake of discussion (with the understanding that work towards stability is still underway and these additional metrics would come after) |
Currently, there are some conventions for connection-level metrics defined on the Database Metrics page. Proposing that query-level metrics are added (in a different section on the same page) to define conventions for the stats and info that can be captured for individual queries.
Some examples could include:
db.query.count
(number of times a query was executed)db.query.plan
(execution plan for a query)db.query.duration
(amount of time taken by the query)db.query.rows_returned
(number of rows returned by a query)The text was updated successfully, but these errors were encountered: