Skip to content

sql: improve how regions information is collected for telemetry #88498

@yuzefovich

Description

@yuzefovich

#86829 added the regions information into the telemetry. In order to minimize the changes and to make the commit backportable it relied on the existing infrastructure used for the EXPLAIN output to get the regions information. This is a bit hacky (e.g. #88343 had to make additional changes to not break things), so we should refactor this since there is no reason to force building the EXPLAIN output when it's only needed to get the regions information output. We should instead analyze the flow specifications (we have "save flows" function for that) after the physical planning has been performed and store the regions information in the instrumentation helper. Care needs to be taken to not introduce any performance impact since getAllNodeDescriptors might have non-trivial overhead.

Jira issue: CRDB-19945

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.E-quick-winLikely to be a quick win for someone experienced.T-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions