cockroachdb / cockroachdb/cockroach

server: extend sql-http-api to be able to attribute executions to user

Open
#126,872 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement T-observability
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.