You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-21Lines changed: 28 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
</p>
4
4
5
5
<h3align="center">hooks</h3>
6
-
<palign="center"style="margin-bottom: 2em;">opinionated decorator suite for easy cross-project observability consistency and self-explanatory codebase</p>
6
+
<palign="center"style="margin-bottom: 2em;">configurable decorators for automated observability and self-explanatory codebase</p>
> Thanks to the [opionated function signature](#opinionated-function-signature), those decorators work out of box with minimum configuration to create a calling stack tree using the exact names of the decorated functions, producing structured log, metrics, tracing.
100
105
@@ -105,23 +110,25 @@ The structured log it produced below makes it a breeze to precisely pinpoint the
>We are calling those decorators **hooks(decorators at call-time beside definition-time)** to indicate that they can be used at any point of a business logic functionlifecycle to extend highly flexible and precise control.
113
+
We are calling those decorators **hooks(decorators at call-time beside definition-time)** to indicate that they can be used at any point of a business logic functionlifecycle to extend highly flexible and precise control.
109
114
110
115
```js
111
116
/* handler.js - configure and attach hooks to business logic steps with hookEachPipe */
112
-
import { pipeHookEach, eventLogger, eventTimer } from '@opbi/hooks';
117
+
import { chain, eventLogger, eventTimer, errorRetry } from '@opbi/hooks';
113
118
import { UserProfileAPI, SubscriptionAPI } from './api.js';
0 commit comments