Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Plot circuit breaker tripped events as a rate values #81438

Merged
merged 1 commit into from
May 19, 2022

Conversation

koorosh
Copy link
Collaborator

@koorosh koorosh commented May 18, 2022

Resolves #78939

Before, Circuit Breaker Tripped events chart displayed the accumulated number
of events since the process started.

Now, it displays the number of events per aggregated interval of time.

Release note (ui change): Circuit Breaker Tripped events chart displays
rate of events per interval instead of the accumulated number of events.

Screen Shot 2022-05-18 at 16 03 22

@koorosh koorosh requested a review from a team as a code owner May 18, 2022 13:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

Looks good mod the comment Help in metrics.go, thanks!

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


pkg/kv/kvserver/metrics.go line 1407 at r1 (raw file):

	metaReplicaCircuitBreakerCumTripped = metric.Metadata{
		Name:        "kv.replica_circuit_breaker.num_tripped_events",
		Help:        `The number of circuit breaker events occurred per second across all nodes since the process started.`,

This isn't "across all nodes", each metric counter is local to a store and thus will be reported at the store level. It just so happens that the chart we later expose in the DB console aggregates over all stores. So the comment in graphTooltips.tsx is correct. Also, this here is still a counter, not a rate. We only compute a rate in the console.

Copy link
Collaborator Author

@koorosh koorosh 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 @tbg)


pkg/kv/kvserver/metrics.go line 1407 at r1 (raw file):

Previously, tbg (Tobias Grieger) wrote…

This isn't "across all nodes", each metric counter is local to a store and thus will be reported at the store level. It just so happens that the chart we later expose in the DB console aggregates over all stores. So the comment in graphTooltips.tsx is correct. Also, this here is still a counter, not a rate. We only compute a rate in the console.

gotcha, then I tend to revert back this Help message because it also doesn't count "per second".

@koorosh koorosh force-pushed the ui-circuit-breaker-rate-graph branch from 361bfd0 to 7948daf Compare May 19, 2022 06:56
@koorosh koorosh force-pushed the ui-circuit-breaker-rate-graph branch from 7948daf to 54358de Compare May 19, 2022 09:49
Before, Circuit Breaker Tripped events chart displayed accumulated number
of events since process started.

Now, it displays number of events per aggregated interval of time.

Release note (ui change): Circuit Breaker Tripped events chart displays
rate of events per interval instead of accumulated number of events.
@koorosh koorosh force-pushed the ui-circuit-breaker-rate-graph branch from 54358de to ea6289b Compare May 19, 2022 12:04
@koorosh
Copy link
Collaborator Author

koorosh commented May 19, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented May 19, 2022

Build failed (retrying...):

@rickystewart
Copy link
Collaborator

bors r-

@craig
Copy link
Contributor

craig bot commented May 19, 2022

Canceled.

@rickystewart
Copy link
Collaborator

bors r=tbg

Sorry, needed to cancel this run to move bors along.

@craig
Copy link
Contributor

craig bot commented May 19, 2022

Build succeeded:

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.

ui: circuit breaker trip events should be plotted as rate
4 participants