Skip to content

Connectum API Reference / @connectum/otel / shared / createHookFailureReporter

Function: createHookFailureReporter() ​

createHookFailureReporter(owner): HookFailureReporter

Defined in: shared.ts:379

Creates the reporter an interceptor uses when one of its user callbacks (filter, attributeFilter) throws.

The callback is the application's code on the path of every RPC: its bug must not fail the call, so the interceptor goes on and reports the error through the OpenTelemetry diagnostics channel (diag), which has no output until the application or initProvider() registers a logger. A callback that is broken for every call would otherwise flood the log, so each callback is reported once per owner. The reporter never throws.

Parameters ​

owner ​

string

What the reporter belongs to, named in the message ("the server interceptor")

Returns ​

HookFailureReporter

The reporter