Built-in services · rule
threshold.subject_unknown
A threshold watches a route, action, query, schedule or subscriber its domain doesn't have.
Area 16, Built-in services; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
A threshold says when something your app does is too slow or failing
too often, and the rules generated from it alert on that one thing. One
that names nothing would never be judged, so a misspelt name would leave
the route or action it meant unwatched without anyone noticing. A
domain's monitoring.jadpo watches only its own domain, so each
domain's file is the whole of what watches it.
What it looks like
counting names an action that isn't declared:
/// How many visitors have come.type VisitorCount = Int { min: 0}/// How many visitors have come so far.action count_visitors() -> VisitorCount { return 1}thresholds { /// Counting the visitors stays quick. counting: { watches: count_visitor p95: 50ms }}
error Nothing called count_visitor to watch
--> main.jadpo:14:18
|14 | watches: count_visitor | ^^^^^^^^^^^^^ nothing to watch
- reason
watches:names an action, query, schedule or subscriber of the threshold's own domain, and the project declares none calledcount_visitor.- next
- Name the action, query, schedule or subscriber of the project that
countingwatches (agent) - rule
- threshold.
subject_ unknown - help
- https://jadpo.
dev/docs/errors/threshold. subject_ unknown
(agent) at the end of the next: line means your coding agent can make
the fix itself.
How to fix it
If the name is misspelt, name what the threshold watches:
counting: { watches: count_visitors p95: 50ms }
counting now watches count_visitors, and the rules made from it
alert when that action's 95th percentile passes 50 ms.
A route is named by its method and its path as jadpo routes prints it,
as a route test names one: route: { method: HttpMethod.post path: "/hello" }. Another domain's route or action is watched from that
domain's own monitoring.jadpo.
Related
Markdown for agents: /docs/errors/threshold.subject_unknown.md.Built from Jadpo main at e00e61f.