← All examples
59 / 100
Jev Capacity anomaly triage Code Example
Distinguish expected traffic from a surprising workload.
The application receives context for a capacity anomaly triage decision.
Traffic +300%
Campaign scheduled launch now
Errors normal
How should this traffic increase be treated?
0%
Expected demand.
Let the application expected demand.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"traffic": "+300%",
"campaign": "scheduled launch now",
"errors": "normal"
};
const decision = await evaluateDecision({
state,
question: "How should this traffic increase be treated?",
options: ["Expected demand","Investigate anomaly","Security review"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Expected demand"
&& decision.probability >= 0.85) {
tagCapacityEvent(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.