Skip to content

server: tenant span stats for TableStats, TableDetails & DatabaseDetails endpoints  #90267

@THardy98

Description

@THardy98

Is your feature request related to a problem? Please describe.
Part of: #89429

Currently, the TableStats and DatabaseDetails endpoints surface span statistics using statsForSpan which makes use of the kv.DB, and the TableDetails endpoint surfaces range count using CountRanges from the kvcoord.DistSender.

Use of these KV operations are blockers from making these endpoints tenant-scoped, as tenants will not have access to the KV layer.

To me, there seem to be a couple options to do this:

  • We can build internal tables to hold span/range statistic information that we can query with SQL. The feasibility/cost of this proposal needs to be determined.
  • Alternatively, supposedly tenants can interact with the KV layer but would need some special auth logic to do so, which we could implement (I'm not too familiar, @dhartunian would be able to provide better context)

Alternative approaches and discussion welcome.

Jira issue: CRDB-20665
Epic: CRDB-16704

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions