ObservabilityTelemetry context
observability/require-operation-context
Log and telemetry events should use a specific message or structured field to name the operation; IDs and status alone are insufficient.
01 Examples
TypeScript
logger.info({ orderId, status });Finding
Require a stable operation identity in events.
02 Enable it
Setup
Install the package, register its plugin factory, then enable the rule.
Install the package
pnpm add -D @scruple/observabilityRegister the plugin
In scruple.config.ts, register the factory under the observability namespace used by the rule ID.
import { observability } from "@scruple/observability";
plugins: {
"observability": observability(),
},Enable the rule
"observability/require-operation-context": "warn"- Package
@scruple/observability- Default threshold
- 0.8
- Minimum confidence
- 0.7