-
Notifications
You must be signed in to change notification settings - Fork 470
DOC-13899 Product Change- PR #147439 - ui: surface SQL commenter query tags in insights #19897
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: main
Are you sure you want to change the base?
Conversation
… corrected SQL CPU Time column name.
Files changed:
|
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Looks good, thanks for adding this!
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.
Small nits regarding how SQL comments (that following the SQLcommenter specification) is an opt-in experience that can be used for application correlation.
@@ -122,15 +122,50 @@ Start Time (UTC) | The timestamp when the statement execution started. | |||
Elapsed Time | The time that elapsed to complete the statement execution. | |||
User Name | The name of the user that invoked the statement execution. | |||
Application Name | The name specified by the [`application_name`]({{ link_prefix }}show-vars.html#supported-variables) session setting. | |||
Query Tags | The [query tags](#query-tags) extracted from comments in the statement query. These tags provide application context and can be used to correlate query performance with client-side application state. |
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.
nit: can* help provide application if set
Note: Users don't get this out of the box. They need to instrument the comment in their query.
{%- endif %} | ||
Full Scan | Whether the execution performed a full scan of the table. | ||
Transaction Fingerprint ID | The ID of the transaction fingerprint for the statement execution. | ||
Latest Transaction Execution ID | The ID of the transaction execution for the statement execution. | ||
|
||
#### Query tags | ||
|
||
{% include_cached new-in.html version="25.3.0" %} The **Query Tags** column displays SQLcommenter query tags for statement executions. These tags provide application context, such as the application name, user ID, or feature flags, embedded in SQL comments that follow the [SQLcommenter specification](https://google.github.io/sqlcommenter/spec/). This information helps correlate slow query performance with specific application states. The **Query Tags** column is available in the **Statement Executions** view's **Statement Insights** table but is hidden by default. To display it, use the **Columns** selector. |
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.
displays SQLcommenter query tags for statement executions
Can we say displays the comments embedded int he query as defined by the specification?
These tags provide application context, such as the application name, user ID, or feature flags, embedded in SQL comments that follow the
Users need to instrument this
Fixes DOC-13899 DOC-13614
In include file insights.md, (1) added section for Query tags and (2) corrected SQL CPU Time column name.
Rendered preview