prometheus / prometheus/alertmanager

Alertmanager exposes errors one by one

Open
#4,989 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

What did you do?

The current implementation of UnmarshalYAML for certain notifiers (specifically discussed regarding Webhooks) uses an early return pattern to propagate errors. This creates a "whack-a-mole" user experience where only the first encountered error is reported, rather than validating the entire configuration block. This specific issue is only about receivers: section of the configuration, but other issues may exist.

What did you expect to see?

Expected to see all errors, which are independent of one another.

What did you see instead? Under which circumstances?

A single error (which depends on the notifier.

System information

No response

Alertmanager version

Alertmanager configuration file
See subtasks for configuration examples.
Prometheus version

Prometheus configuration file

Logs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the UnmarshalYAML implementations for receiver notifiers, especially the webhook-related code, and examine the configuration examples referenced in the subtasks. Done means validation of a receivers configuration reports all independent errors rather than stopping after the first one.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.