File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11// @ts -check
2+ const fp = require ( 'fastify-plugin' ) . default ;
23const configureAWSXRaySync = require ( './private/configure-aws-x-ray-sync' ) ;
34const onRequestHook = require ( './hooks/on-request.hook' ) ;
45const onResponseHook = require ( './hooks/on-response.hook' ) ;
56const onErrorHook = require ( './hooks/on-error.hook' ) ;
67
78/** @type {import('fastify').FastifyPluginAsync } */
8- const xRayFastifyPlugin = async ( fastify , opts ) => {
9+ const xRayFastifyPlugin = fp ( async ( fastify , opts ) => {
910 configureAWSXRaySync ( fastify , opts ) ;
1011
1112 fastify . decorateRequest ( 'segment' , null ) ;
1213 fastify
1314 . addHook ( 'onRequest' , onRequestHook )
1415 . addHook ( 'onResponse' , onResponseHook )
1516 . addHook ( 'onError' , onErrorHook ) ;
16- } ;
17+ } ) ;
1718
1819module . exports = xRayFastifyPlugin ;
1920
You can’t perform that action at this time.
0 commit comments