Skip to content

Release v2.0.0#39

Merged
fxthiry merged 10 commits intomainfrom
release/2.0.0
Apr 16, 2026
Merged

Release v2.0.0#39
fxthiry merged 10 commits intomainfrom
release/2.0.0

Conversation

@fxthiry
Copy link
Copy Markdown
Owner

@fxthiry fxthiry commented Apr 16, 2026

Promotes release/2.0.0 to main. Major version bundling the v2.0.0-rc1 work plus the final doc consolidation, validated end-to-end by the issue #34 reporter.

Bundled

  • feat!: multi-source VictoriaLogs (PR feat!: multi-source VictoriaLogs (v2.0.0 part 1, #34) #36). victorialogs: becomes a map of named sources. Rules gain optional vl_sources: [name, ...]. Engine spawns one task per (rule, source) pair with per-source cancellation and reconnect isolation. {{ vl_source }} injected into every template context where {{ rule_name }} flowed. Default throttle key changes to {rule}-{source}:global. Legacy single-URL shape rejected at load with a migration-oriented error.
  • feat!: multi-source observability and guardrails (PR feat!: multi-source observability and guardrails (v2.0.0 part 2, #34) #37). vl_source label added to every per-rule Prometheus counter. valerter_victorialogs_up{rule_name} replaced by valerter_vl_source_up{vl_source} per-source gauge. defaults.max_streams: 50 cap with load-time enforcement. ±10% uniform jitter on reconnect backoff per (rule, source) task. tests/metrics_snapshot.rs integration test locks metric names + label keys against drift.
  • chore(tests): VictoriaLogs event fixtures corpus (PR chore(tests): add VictoriaLogs event fixtures corpus (D-25-2) #35). 15 anonymised JSON events covering nginx, cisco, k8s, Windows, journald, OTel, unicode, edge cases. Parameterised template test harness consumes them.
  • chore(docs): doc consolidation (PR chore(docs): v2.0.0 doc consolidation, fix stale examples + ship MIGRATION + multi-source sample #38). MIGRATION.md at repo root with v1→v2 upgrade guide. examples/multi-source/ reference config. README Features reorder. Accuracy banner on docs/performance.md. Two new integration tests lock shipped samples against drift.

Validation

  • v2.0.0-rc1 tested end-to-end against two distinct VictoriaLogs backends (remote + local docker), routing matrix confirmed (single-source pinned, fan-out, per-source isolation).
  • Metrics snapshot test locks /metrics output schema; max_streams rejection verified live.
  • 551 tests passing (479 lib + 72 integration), clippy + fmt clean.
  • Issue #34 reporter confirmed rc1 works on their infrastructure and asked for the release to ship.
  • All three shipped example configs (config/config.example.yaml, examples/cisco-switches/config.yaml, examples/multi-source/config.yaml) validate. README Quick Start + docs/getting-started.md minimal config both validate on copy-paste.

Breaking changes

See CHANGELOG.md section ## [2.0.0] for the full text. Short list:

  • victorialogs: shape change (mandatory migration via map of named sources).
  • Default throttle key {rule}:global{rule}-{source}:global.
  • Source names restricted to ^[a-zA-Z0-9_]+$.
  • Prometheus counters gain vl_source label.
  • valerter_victorialogs_up{rule_name} removed, replaced by valerter_vl_source_up{vl_source}.
  • Mattermost footer and default webhook payload extended with the source name.
  • defaults.max_streams: 50 default cap added.

MIGRATION.md at the repo root has the full upgrade checklist with PromQL examples.

Release flow

After this merge, v2.0.0 gets tagged on the merge commit and the release build produces the final binaries and debs.

François-Xavier THIRY and others added 10 commits April 16, 2026 11:20
Fifteen anonymised single-line JSON events under tests/fixtures/vl_events/
cover the shapes encountered in practice: nginx flat-dotted, cisco regex-
extractable, k8s with label keys, Windows PascalCase, journald _SYSTEMD_*,
OpenTelemetry (randomised IDs, not the W3C canonical examples), raw _msg
only, JSON-embedded _msg, edge cases (unicode CJK + emoji, empty fields,
literal dotted keys), audit, docker, syslog daemon.

A YAML manifest documents each fixture (description, source_system, tags,
prevents_regression_for). The helper module tests/common/vl_events.rs
exposes load_fixture, load_fixtures_by_tag, load_fixtures_by_source_system,
and all_fixtures, with the manifest cached lazily via OnceLock and indexed
as a BTreeMap for determinism across parallel test runs.

Two integration test files ship the first consumers. The consistency test
checks index <-> filesystem coherence, one-line JSON shape, required VL
fields, and tag/source enumeration. The parameterised template test
exercises a byte-exact render of _msg/_time against the whole corpus, the
#25 dotted-key regression on the dotted_keys tag, the empty-field contract
on edge_empty_fields, the lenient-undefined contract on raw sources, and
unicode round-tripping on the unicode fixture.

This delivers deferred item D-25-2 and lays groundwork for v2.0.0 multi-
source testing.
chore(tests): add VictoriaLogs event fixtures corpus (D-25-2)
`victorialogs:` becomes a `BTreeMap<String, VlSourceConfig>` indexed by
source name. Rules gain an optional `vl_sources: [name, ...]` field;
absent means fan out to every configured source. The engine spawns one
task per (rule, source) pair with per-source cancellation and reconnect
isolation, so a single unhealthy source does not stop alerts on the
others.

Synthetic `vl_source` is injected into every render context where
`rule_name` already flowed: layer 1 templates (title, body,
email_body_html), throttle.key, and notifier-level layer 2 contexts.
The default throttle key becomes `{rule}-{source}:global` so multi-source
deployments get isolated buckets per source out of the box.

Source names are restricted to `^[a-zA-Z0-9_]+$` to keep the default
throttle key separator (`-`) unambiguous. Rules reject duplicate
`vl_sources` entries at load. The legacy single-URL config shape is
rejected with an actionable migration error.

`AlertPayload.vl_source` propagates end-to-end. The Mattermost footer
gains a source segment and the default webhook payload exposes
`vl_source` as a top-level JSON field. See CHANGELOG v2.0.0 Breaking
section for the full migration.

Tests consume the fixtures corpus (PR #35). The new
`tests/multi_source_integration.rs` exercises the full routing matrix
across two wiremock VL backends, including a negative-evidence assertion
that a pinned rule does not leak to the unpinned source.

Observability and guardrails (metrics `vl_source` label,
`valerter_vl_source_up` gauge, `max_streams` cap, reconnect jitter) ship
as a separate spec part 2 before the v2.0.0 tag.

Cargo.toml not bumped here; version bump lives in the release PR.
feat!: multi-source VictoriaLogs (v2.0.0 part 1, #34)
Adds the `vl_source` Prometheus label to every per-rule counter, replaces
the legacy `valerter_victorialogs_up{rule_name}` gauge with a per-source
`valerter_vl_source_up{vl_source}`, introduces a `defaults.max_streams`
cap with load-time enforcement, applies +/-10% uniform jitter on reconnect
backoff per (rule, source) task to break thundering-herd alignment, and
ships a `/metrics` snapshot integration test that catches accidental
relabel or rename in future PRs.

Multi-source operators can now attribute every alert and error rate to a
specific source. The new gauge makes partial-source outages visible
without requiring per-rule reachability inference. The cap prevents an
accidental (rule x source) fan-out from DoS'ing a backend at startup.

Post-review hardening folded in: dated v1.2.1 in CHANGELOG, added
PromQL migration snippet for dashboards, extended snapshot coverage
to include lines_discarded / query_duration / last_query_timestamp /
per-notifier sentinel counters, made the jitter floor test exercise the
actual clamp branch, demoted backoff_delay_default to pub(crate),
extended ReconnectCallback::on_reconnect to receive vl_source, and
rejected max_streams=0 at load with a clear error.

Cargo.toml not bumped here; version bump lives in the release PR.
…dy_html

Documents a pre-existing concern made wider by the v1.2.0 #26 fix: the
example config now actively pipes `{{ _msg }}` into `body`, and operators
who mirror this pattern in `email_body_html` may inadvertently render
unescaped HTML/script content from untrusted log fields. Hardening of the
email path is a follow-up; the advisory makes the limit visible at the
v2.0.0 release boundary.
feat!: multi-source observability and guardrails (v2.0.0 part 2, #34)
…ATION + multi-source sample

Three v1.x example configs (README Quick Start, docs/getting-started.md
minimal, examples/cisco-switches/config.yaml) were rejected by --validate
on v2.0.0; they are now migrated to the map shape with a `default:` source.

Adds a top-level MIGRATION.md with a 5-section guide for v1.x upgraders:
pre-upgrade checklist, config migration with before/after snippets,
Prometheus metric migration with PromQL examples, notifier output format
changes (Mattermost footer + default webhook payload), and a rollback
path. Linked from README and CHANGELOG.

Adds examples/multi-source/ with a complete reference config and a
README explaining the routing matrix (one rule pinned to prod, one
pinned to staging, one fan-out across both). Closes the explicit ask
from the issue #34 reporter for a sample multi-source config.

README Features list hoists "One Valerter for every VictoriaLogs you
run" to position #1, reworded outcome-led. A blockquote callout right
after Quick Start points v1.x upgraders at MIGRATION.md.

docs/performance.md gains an accuracy banner since the throughput
numbers were measured against v1.x (single task per rule); the
multi-source N x M task model and max_streams cap are mentioned and
will be re-measured separately.

Two new integration tests in tests/integration_validate.rs lock the
shipped samples against future drift: shipped_config_example_validates
and shipped_examples_pass_validate (iterates examples/*/config.yaml).
The 2.0.0 entry in CHANGELOG gains one Added line pointing at the new
sample and MIGRATION.md.
chore(docs): v2.0.0 doc consolidation, fix stale examples + ship MIGRATION + multi-source sample
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 79.47883% with 63 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tail.rs 47.05% 36 Missing ⚠️
src/main.rs 0.00% 16 Missing ⚠️
src/engine.rs 94.59% 4 Missing ⚠️
src/config/types.rs 94.73% 2 Missing ⚠️
src/notify/queue.rs 0.00% 2 Missing ⚠️
src/notify/webhook.rs 71.42% 2 Missing ⚠️
src/template.rs 92.30% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@fxthiry fxthiry merged commit 441c6e1 into main Apr 16, 2026
5 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.

1 participant