ObservabilityError telemetry
observability/no-duplicate-error-reporting
A catch handler should not send multiple recognized reports for the same exception unless a visible policy intentionally requires dual emission.
01 Examples
TypeScript
catch (error) { logger.error(error); telemetry.captureException(error); }Finding
Do not report the same caught failure twice.
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/no-duplicate-error-reporting": "warn"- Package
@scruple/observability- Default threshold
- Plugin default
- Minimum confidence
- 0.7