Skip to content

ui: add trace rate option to stmt diagnostics#101381

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
maryliag:stmt-bundle-trace
Apr 18, 2023
Merged

ui: add trace rate option to stmt diagnostics#101381
craig[bot] merged 1 commit intocockroachdb:masterfrom
maryliag:stmt-bundle-trace

Conversation

@maryliag
Copy link
Copy Markdown
Contributor

Fixes #92415

Add option to select the trace rate for statement
diagnostics collection directly on the Console.

https://www.loom.com/share/beaf1ce16f7d4efc845056e33cb3bee1

Screenshot 2023-04-12 at 4 09 50 PM

Screenshot 2023-04-12 at 4 10 00 PM

Release note (ui change): Add option to select the trace rate for statement diagnostics collection.

@maryliag maryliag requested review from a team and dongniwang April 12, 2023 20:11
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@maryliag maryliag added the backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only label Apr 12, 2023
Copy link
Copy Markdown

@dongniwang dongniwang left a comment

Choose a reason for hiding this comment

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

LGTM!

Fixes cockroachdb#92415

Add option to select the trace rate for statement
diagnostics collection directly on the Console.

Release note (ui change): Add option to select the trace rate
for statement diagnostics collection.
Copy link
Copy Markdown

@THardy98 THardy98 left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @maryliag)


pkg/ui/workspaces/cluster-ui/src/api/statementDiagnosticsApi.ts line 92 at r1 (raw file):

    args.push(samplingProbability);
  } else {
    args.push(0);

Not sure if we want to allow sampling probability of 0, wouldn't this never sample?
Or is 0 a special value that means "always sample" until we get the statement diagnostics bundle?

Copy link
Copy Markdown
Contributor Author

@maryliag maryliag 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 (waiting on @THardy98)


pkg/ui/workspaces/cluster-ui/src/api/statementDiagnosticsApi.ts line 92 at r1 (raw file):

Previously, THardy98 (Thomas Hardy) wrote…

Not sure if we want to allow sampling probability of 0, wouldn't this never sample?
Or is 0 a special value that means "always sample" until we get the statement diagnostics bundle?

the 0 is what the function expects, but when you passed it actually uses NULL. You can see in the loom some cases with NULL. When we have NULL the sampling is actually 100%

Copy link
Copy Markdown

@THardy98 THardy98 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 (waiting on @maryliag)

@maryliag
Copy link
Copy Markdown
Contributor Author

TFTR!
bors r+

@craig craig bot merged commit 479ee62 into cockroachdb:master Apr 18, 2023
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 18, 2023

Build succeeded:

@maryliag
Copy link
Copy Markdown
Contributor Author

blathers backport 22.2

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Apr 18, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 8842795 to blathers/backport-release-22.2-101381: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

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

Labels

backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate adding sampling probability to statement bundle collection

4 participants