Skip to content

feat: Add configurable detection thresholds for anomaly detection#5

Merged
nik-kale merged 1 commit intomainfrom
feat/configurable-thresholds
Dec 26, 2025
Merged

feat: Add configurable detection thresholds for anomaly detection#5
nik-kale merged 1 commit intomainfrom
feat/configurable-thresholds

Conversation

@nik-kale
Copy link
Copy Markdown
Owner

Summary

This PR introduces configurable thresholds for anomaly detection, allowing users to tune AutoRCA-Core for their specific environment. Different systems have different baselines, and this feature enables customization without code changes.

Changes

  • Created autorca_core/config.py with ThresholdConfig dataclass
  • Added support for environment variable configuration
  • Updated GraphBuilder to use configurable thresholds for:
    • Error spike detection (count and time window)
    • Latency spike detection (threshold and count)
    • Resource exhaustion detection (percentage and count)
  • Updated apply_rules to use configurable correlation windows
  • Added preset configurations: strict() and relaxed()
  • Updated all RCA functions to accept optional thresholds parameter
  • Exported ThresholdConfig from package __init__.py

Type of Change

  • New feature (non-breaking change adding functionality)

Testing

Tested with default, strict, and relaxed configurations. All thresholds can be customized via:

  1. Constructor parameters
  2. Environment variables (AUTORCA_*)
  3. Preset configurations

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No new warnings introduced
  • All hardcoded thresholds replaced with configurable values

Related Issues

Implements Feature #4 from feature roadmap

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

feat: add configurable detection thresholds for anomaly detection
@nik-kale nik-kale force-pushed the feat/configurable-thresholds branch from b2361b9 to 1dbda9e Compare December 26, 2025 23:54
@nik-kale nik-kale merged commit 5debb65 into main Dec 26, 2025
0 of 4 checks passed
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.

2 participants