Add a counter to track errors by component, replacing the need to parse logs for error rates.
Metrics:
wva_errors_total counter {component, error_type}
Implementation:
- Components:
collector, analyzer, optimizer, limiter, enforcer, controller
- Increment on every
logger.Error() call in engine and controller
- Consider a helper
metrics.RecordError(component, errorType string) to keep call sites clean
Acceptance Criteria:
Add a counter to track errors by component, replacing the need to parse logs for error rates.
Metrics:
Implementation:
collector,analyzer,optimizer,limiter,enforcer,controllerlogger.Error()call in engine and controllermetrics.RecordError(component, errorType string)to keep call sites cleanAcceptance Criteria: