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

Metrics: some metrics will be loss if operation finished abnormal. #5230

Open
bufferflies opened this issue Jun 24, 2022 · 1 comment
Open
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@bufferflies
Copy link
Contributor

Enhancement Task

If the scheduled operator finish abnormal like timeout or cancel, the finish counter will loss.
relate code:

case operator.SUCCESS:
log.Info("operator finish",
zap.Uint64("region-id", op.RegionID()),
zap.Duration("takes", op.RunningTime()),
zap.Reflect("operator", op),
zap.String("additional-info", op.GetAdditionalInfo()))
operatorCounter.WithLabelValues(op.Desc(), "finish").Inc()
operatorDuration.WithLabelValues(op.Desc()).Observe(op.RunningTime().Seconds())
for _, counter := range op.FinishedCounters {
counter.Inc()
}

@bufferflies bufferflies added the type/enhancement The issue or PR belongs to an enhancement. label Jun 24, 2022
@bufferflies bufferflies changed the title Metrics: some metrics will be loss if operation finished abnormal. Metrics: some metrics will be loss if operation finished abnormal. Jun 24, 2022
@bufferflies
Copy link
Contributor Author

And I have another question: some counter may be behind if the duration of the operator is high.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant