A TypeScript-based gRPC client interceptor that integrates with Rootle log API for logging gRPC errors, currently at stable version 0.0.4. It allows specifying request fields to use as referer and user-agent via an InterceptorRequestSources interface. The interceptor is used as a custom gRPC interceptor passed to a gRPC client, enabling structured error logging. Compared to manual logging, it provides a drop-in solution for Rootle logging without modifying client code.
npm install rootle-grpc-interceptorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate a Rootle logger with API key and service name, then use the interceptor in a gRPC client.
Verify field names in request object match the keys passed to Rootle constructor (case-sensitive).
The interceptor only adds logging; it does not affect request/response flow; ensure error loggers are properly configured.
Check for newer versions or consider locking version to avoid unexpected changes.
Use `import Rootle from 'rootle'` (ESM) or `const Rootle = require('rootle').default` (CJS).Run `npm install rootle-grpc-interceptor` and ensure import path is correct.
Ensure the imported interceptor is used as a value, not a type; pass `[Interceptor]` directly.