cockroachdb / cockroachdb/cockroach
server: extend sql-http-api to be able to attribute executions to user
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
As of PR https://github.com/cockroachdb/cockroach/pull/125668 we are able to attribute statements run in internal executors to external processes by using an internal executor override which will set the app prefix to `$ public-internal` instead of `$ internal`. The SQL over HTTP API should be extended to be able to do this for a request since it can be used for external operations.
**Describe the solution you'd like**
Add a field to the request to attribute the request as an 'external' execution. https://github.com/cockroachdb/cockroach/blob/281b6e7c5a379ec125932d3bd62d6926c62d8f15/pkg/server/api_v2_sql.go#L200-L208
Jira issue: CRDB-40164
Contributor guide
Assessment
This issue has not been assessed yet.