feat: SDK for Plugins #860
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar#860
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub.
Original GitHub issue: #2502
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/2502
Original created: 2026-01-25T07:21:14Z
Is your feature request related to a problem?
We've created two seperate new repos for the SDKs:
https://github.com/carverauto/serviceradar-sdk-go
https://github.com/carverauto/serviceradar-sdk-rust
The SDK should build bundles for us, basically it would need to create a .zip, but I'm not sure how we would use the SDK to do this without compiling something first.. not exactly sure the best way to do this in a very programmatic way, would be easy to put something in a Makefile or create a script, but the ergonomics of using it/DX seems bad.
This updated PRD incorporates the Alerting and Event Promotion logic.
In ServiceRadar, plugins are more than just "data gatherers"; they are the first line of defense in the Log → Event → Alert → Notification hierarchy. This SDK must allow authors to explicitly signal where a result sits within that promotion chain.
PRD: ServiceRadar Plugin SDK (Updated)
1. Overview
The ServiceRadar Plugin SDK is a developer-facing library that abstracts low-level Wasm Host-Guest communication. It provides an ergonomic way to write custom network checkers, interact with proxied networking, and explicitly drive the ServiceRadar Event Pipeline.
2. Goals
serviceradar.plugin_result.v1.http.Get,net.Conn) via host functions.3. Functional Requirements
3.1 Environment & Config
schema.json.sdk.GetConfig(&myConfigStruct)let cfg: MyConfig = sdk::get_config()?;3.2 The Result Builder (UI & Pipeline)
The SDK must provide a builder pattern for the
PluginResultschema:OK,WARNING,CRITICAL,UNKNOWN).AddStatCard,AddTable,AddSparkline.AddMetric(name, value, unit, thresholds).3.3 Safe Logging & Event Submission
Debug,Info,Warn,Error).sdk.EmitEvent(sdk.SeverityWarning, "High Latency Detected", "latency_threshold")3.4 Alerting & Promotion Logic
Plugins must be able to influence the promotion of Events to Alerts.
3.5 Proxied Networking (The Bridge)
httpRequestPayloadwith a familiar request/response model.io.Reader/Writer).4. Technical Requirements
4.1 Memory Model
alloc(size)for the Agent to write data into Wasm memory.dealloc(ptr, size)to prevent memory leaks.4.2 Promotion Schema (
serviceradar.plugin_result.v1)The SDK must populate the following fields in the result JSON to drive the backend pipeline:
events: An array of structured event objects.alert_hint: Boolean; if true, hints to Core that this result requires immediate operator attention.condition_id: A string used to correlate "CRITICAL" events with their subsequent "OK" recovery.5. Developer Experience (DX)
5.1 Go (TinyGo) Example: Alerting on Latency
6. Security Requirements
envmodule imports.7. Delivery & Distribution
serviceradar-sdk-goserviceradar-sdk-rusthttp_get_checker: Basic status/latency check with thresholds.tcp_port_checker: Verifies specific ports with event logging.docs.serviceradar.cloudwith a "Alerting and Events" section for plugin authors explaining the dampening and promotion flow.8. Success Criteria
.wasmbinary remains minimal (< 2MB).9. Feature Roadmap Refinement
PluginResultbuilder and HTTP bridge.serdeintegration for config mapping.RequestImmediateAlert(key)maps to the Core-Elixir promotion logic.