Skip to content

sql: include regions information into the sampled query telemetry#86829

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
yuzefovich:telemetry-regions
Aug 26, 2022
Merged

sql: include regions information into the sampled query telemetry#86829
craig[bot] merged 2 commits intocockroachdb:masterfrom
yuzefovich:telemetry-regions

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

execstats: remove unused regions field

This field was never actually populated nor used since it was introduced
in 9f716a7.

Release justification: low-risk cleanup.

Release note: None

sql: include regions information into the sampled query telemetry

This commit adds the regions (where SQL processors where planned for the
query) to the sampled query telemetry. This required a couple of minor
changes to derive the regions information stored in the instrumentation
helper earlier (before the logging takes place).

Fixes: #85427.

Release justification: low-risk improvement.

Release note (sql change): The structured payloads used for telemetry
logs now include the new Regions field which indicates the regions of
the nodes where SQL processing ran for the query.

@yuzefovich yuzefovich requested review from a team, THardy98 and rytaft August 24, 2022 22:50
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Awesome thanks!

Reviewed 3 of 3 files at r1, 10 of 10 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @THardy98)

This field was never actually populated nor used since it was introduced
in 9f716a7.

Release justification: low-risk cleanup.

Release note: None
@yuzefovich yuzefovich force-pushed the telemetry-regions branch 2 times, most recently from 7fef74f to 92a5003 Compare August 25, 2022 21:18
@yuzefovich yuzefovich requested review from a team as code owners August 25, 2022 21:18
@yuzefovich yuzefovich requested review from srosenberg and removed request for a team August 25, 2022 21:18
Copy link
Copy Markdown
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @rytaft, @srosenberg, and @THardy98)


docs/generated/eventlog.md line 2607 at r4 (raw file):

| `ZigZagJoinCount` | The number of zig zag joins in the query plan. | no |
| `ContentionNanos` | The duration of time in nanoseconds that the query experienced contention. | no |
| `Regions` | The regions of the nodes where SQL processors ran. | no |

I'm assuming that the regions information is not sensitive, does that sound right? cc @kevin-v-ngo

@yuzefovich yuzefovich removed request for a team and srosenberg August 26, 2022 02:17
This commit adds the regions (where SQL processors where planned for the
query) to the sampled query telemetry. This required a couple of minor
changes to derive the regions information stored in the instrumentation
helper earlier (before the logging takes place).

Release justification: low-risk improvement.

Release note (sql change): The structured payloads used for telemetry
logs now include the new `Regions` field which indicates the regions of
the nodes where SQL processing ran for the query.
@yuzefovich
Copy link
Copy Markdown
Member Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 26, 2022

Build succeeded:

@craig craig bot merged commit 50256c3 into cockroachdb:master Aug 26, 2022
@yuzefovich yuzefovich deleted the telemetry-regions branch August 27, 2022 01:22
@rytaft
Copy link
Copy Markdown
Collaborator

rytaft commented Aug 27, 2022

Can we backport this to 22.1?

@yuzefovich
Copy link
Copy Markdown
Member Author

Can we backport this to 22.1?

This would require pulling in some of the changes made in #84718 (in particular, we'd need to get the trace recording one more time, before logging the telemetry). Is the backport desirable?

@rytaft
Copy link
Copy Markdown
Collaborator

rytaft commented Aug 29, 2022

cc @vy-ton @kevin-v-ngo @awoods187 see @yuzefovich's question above. Not sure how important it is to get region telemetry from 22.1. (Otherwise this will just be included in 22.2)

@vy-ton
Copy link
Copy Markdown
Contributor

vy-ton commented Sep 6, 2022

If possible, I'd like to see this backported to 22.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql: collect log-based telemetry on regions visited by each query

4 participants