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

Mutate Processor mutation_timeouts metrics does not account for early exit #1894

Closed
cmwylie19 opened this issue Mar 5, 2025 · 0 comments · Fixed by #1895
Closed

Mutate Processor mutation_timeouts metrics does not account for early exit #1894

cmwylie19 opened this issue Mar 5, 2025 · 0 comments · Fixed by #1895
Milestone

Comments

@cmwylie19
Copy link
Contributor

Environment

Device and OS:
App version:
Kubernetes distro being used:
Other:

Steps to reproduce

There are several places in the mutate process where the request will exit early before the final return of the response. This leads to metricCollector incrementing the count for mutation timeouts which is inaccurate. We need to stop the timer to ensure we have accurate metrics.

Expected result

If an early exit occurs, we need to stop the timer.

Actual Result

It is not stopped and the mutation_timeout metric is incremented.

Visual Proof (screenshots, videos, text, etc)

Severity/Priority

Additional Context

Add any other context or screenshots about the technical debt here.

@cmwylie19 cmwylie19 added this to the v0.46.2 milestone Mar 5, 2025
github-merge-queue bot pushed a commit that referenced this issue Mar 6, 2025
## Description

There are several places in the mutate process where the request will
exit early before the final return of the response. This leads to
metricCollector incrementing the count for mutation timeouts which is
inaccurate. We need to stop the timer to ensure we have accurate
metrics.

## Related Issue

Fixes #1894 
<!-- or -->
Relates to #

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging
- [x] Unit,
[Journey](https://github.com/defenseunicorns/pepr/tree/main/journey),
[E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples),
[docs](https://github.com/defenseunicorns/pepr/tree/main/docs),
[adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or
updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

Signed-off-by: Case Wylie <[email protected]>
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Pepr Project Board Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant