Skip to content

Remove the always-on alarm-to-event conversion (EventHookCallback)#13925

Merged
wu-sheng merged 1 commit into
masterfrom
remove-alarm-to-event-conversion
Jun 23, 2026
Merged

Remove the always-on alarm-to-event conversion (EventHookCallback)#13925
wu-sheng merged 1 commit into
masterfrom
remove-alarm-to-event-conversion

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

Remove the always-on alarm-to-event conversion (EventHookCallback)

EventHookCallback was wired unconditionally in NotifyHandler.init() (not part of AlarmHooksType, no config, no off switch), so every triggered alarm was synthesized into the events pipeline as an Alarm (Type.Error) / AlarmRecovery (Type.Normal) event via EventAnalyzerService.analyze(...).

This conflated two distinct concepts: alarm is alarm, event is only from event. After this change, events originate only from real event sources (agents, SkyWalking CLI, Kubernetes Event Exporter). Alarms remain fully available through the alarm store (getAlarm / queryAlarms) and the configured alarm hooks (Webhook/gRPC/Slack/WeChat/DingTalk/Feishu/WeLink/PagerDuty/Discord).

Notes:

  • No feedback loop existed (events persist as Records; alarms fire only off the Metrics stream; there is no OAL source for the EVENT scope), so this is a clean removal, not a correctness fix.
  • The read-side correlation (AlarmQuery.findRelevantEvents, the AlarmMessage.events GraphQL field) is kept — it surfaces real events on the alarmed entity as root-cause context and is consistent with the principle.
  • Removed the now-dead event-analyzer dependency from server-alarm-plugin to complete the decoupling.

Changes:

  • Delete EventHookCallback and its registration in NotifyHandler; delete EventHookCallbackTest.

  • Drop the event-analyzer dependency from server-alarm-plugin/pom.xml.

  • Remove the Alarm row from the "Known Events" table in docs/en/concepts-and-designs/event.md (it was the only event sourced "from internal SkyWalking OAP", contradicting the doc's own framing).

  • Update the alarm/baseline e2e expected files and the e2e guide recipe that asserted the synthetic Alarm event.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.

  • Update the CHANGES log.

A triggered alarm is no longer synthesized into the events pipeline as an
Alarm/AlarmRecovery event; events now originate only from real event sources
(agents, SkyWalking CLI, Kubernetes Event Exporter). Alarms remain available
through the alarm store (getAlarm/queryAlarms) and the configured alarm hooks.

- Delete EventHookCallback and its unconditional registration in NotifyHandler.
- Delete EventHookCallbackTest.
- Drop the now-dead event-analyzer dependency from server-alarm-plugin.
- Remove the 'Alarm' Known-Event row from event.md; update the e2e guide recipe.
- Update the alarm/baseline e2e expected files to assert 'events: []' — the
  alarm now correlates no synthetic event (swctl 'alarm ls' still projects the
  events field, so the expectation must assert the empty list).
- Add a CHANGES entry.
@wu-sheng wu-sheng force-pushed the remove-alarm-to-event-conversion branch from 312d625 to c29ac55 Compare June 23, 2026 00:28
@wu-sheng wu-sheng added this to the 11.0.0 milestone Jun 23, 2026
@wu-sheng wu-sheng added the backend OAP backend related. label Jun 23, 2026
@wu-sheng wu-sheng merged commit f409ed7 into master Jun 23, 2026
434 of 439 checks passed
@wu-sheng wu-sheng deleted the remove-alarm-to-event-conversion branch June 23, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants