← Back to Pull requests

Support several v1 and v2 configuration files #3344

Closed
unknown closed this pull request without merging on Nov 30, 2026 18:34 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 10:03 UTC
Author

Beyla can now load several configuration files, layered from lower to higher priority.

  • -config can be repeated: beyla -config base.yml -config overrides.yml

  • BEYLA_CONFIG_PATH accepts a :-separated list of files. These files have priority over the -config ones.

  • A file only overrides the properties that it actually defines in its YAML, even when the value is the default. Maps are merged key by key; lists and other values are replaced as a whole.
  • Mixing Beyla v1 and OBI v2 files

    Beyla v1 files and OBI config v2 documents can be combined:

    1. The v1 files are loaded over DefaultConfig(), then the environment variables are applied to the result, the same as today.
    2. If there are v2 documents, the v1 result is converted with AsOBI() and exported to config v2, the same way as beyla config migrate does. The v2 documents are then layered over it, and the result is converted back.
    3. As in OBI, environment variables don't override the v2 documents. To use one there, reference it explicitly with ${VAR}.
    4. Beyla-only settings (grafana, topology, injector, …) keep their values from the v1 files and the environment.

    Restrictions and edge cases:

  • A v1 file can't follow a v2 document. This keeps the conversion to a single step.

  • Settings that config v2 can't represent, such as prometheus_export.path, keep their v1 value unless a v2 document changes the same field.

  • Without any v1 file, the v2 documents keep the OBI v2 defaults, so a single v2 file loads as before.
  • Configuration refresh

    Refresh without a restart now works with any combination of files. When any file changes, Beyla reloads all of them with the same loader used at startup, and applies the discovery and sampling changes.

    v1, v2 and mixed configurations now all go through Beyla's configrefresh.Refresher, instead of OBI's v2 watcher. The startup reference and the reloads are therefore built the same way.

    Behavior changes

  • BEYLA_CONFIG_PATH used to replace -config. Now both are combined.

  • With a single v2 file, Beyla-only settings get the Beyla defaults (for example, the processes collection interval) instead of zero values.

  • A malformed YAML file now reports a plain YAML syntax error, instead of a "config v2" error.
  • Diff: 292 lines (+219 / -73) across 3 files Reviewer: grcevski Review duration: 510m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 292 lines diff across 3 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.340
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #3344"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 63.1% (MEDIUM) · Higher = larger blast radius
    63.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.9% · Safe to merge
    24.9%
    Repository