Compose multiple ObservabilityHooks instances into one.
All hooks are called in the order they are supplied. If one hook throws, the error is swallowed and the remaining hooks are still invoked.
Useful for combining the built-in ConsoleLogger with a custom metrics hook in development:
Rest
import { composeHooks, ConsoleLogger } from '...';const sdk = new OnboardingBridgeSDK({ // ... hooks: composeHooks(ConsoleLogger, myMetricsHooks),}); Copy
import { composeHooks, ConsoleLogger } from '...';const sdk = new OnboardingBridgeSDK({ // ... hooks: composeHooks(ConsoleLogger, myMetricsHooks),});
Compose multiple ObservabilityHooks instances into one.
All hooks are called in the order they are supplied. If one hook throws, the error is swallowed and the remaining hooks are still invoked.
Useful for combining the built-in ConsoleLogger with a custom metrics hook in development: