autotel
Version:
Write Once, Observe Anywhere
28 lines (27 loc) • 1.22 kB
JavaScript
// src/validation-attributes.ts
var VALIDATION_ATTR = {
/** Contract id of the validated boundary, e.g. `POST /orders`, `order.placed`. */
name: "validation.name",
/** Where validation ran: `http` | `event` | `message` | a custom label. */
boundary: "validation.boundary",
/** `observe` (recorded, request continues) or `reject` (recorded, then failed). */
mode: "validation.mode",
/** Stable hash of the declared shape, when a JSON-schema projection is given. */
hash: "validation.hash",
/** `info` | `warning` | `error`. */
severity: "validation.severity",
/** Number of failing fields. */
issueCount: "validation.issue.count",
/** Comma-separated failing field paths (capped). Never contains values. */
issuePaths: "validation.issue.paths",
/** Comma-separated distinct issue codes (capped). Never contains values. */
issueCodes: "validation.issue.codes"
};
var VALIDATION_METRICS = {
/** Counter, labelled `{ boundary, validation, mode }`. */
mismatches: "autotel.validation.mismatches"
};
var VALIDATION_ISSUE_CAP = 20;
export { VALIDATION_ATTR, VALIDATION_ISSUE_CAP, VALIDATION_METRICS };
//# sourceMappingURL=chunk-DCEDJQGG.js.map
//# sourceMappingURL=chunk-DCEDJQGG.js.map