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
We have currently an API platform based on HapiJS (v16.5.2), using good (v7.3.0) and wreck (v10.0.0).
This stack allows use a lot of logs based on good and the support of wreck events.
So the monitoring/instrumentation is ease.
With the lastest version, the wreck event are no more supported from hapi/good (hapijs/good#568).
Do you thinks it's possible to expose the wreck configuration accessible from the h2o2 package configuration ?
I'm pretty new in NodeJs, so if I miss somethings don't hesitate to fix me 😄
My workaround is to duplicate the reverse proxy mechanism in h2o2 and add the following code to activate the wreck log mechanism.
Subscribe to wreck event (in this case, the response)
Wreck.events.on('response',handler);
Register a new event named custom in Hapi server
server.event('custom');
Raised a custom event server in the wreck handler
consthandler=async(err,details)=>{if(err){throwerr;}// Based on good source code https://github.com/hapijs/good/tree/v7.3.0awaitserver.events.emit('custom',newWreckResponse(err,details.req,details.res,details.start,details.uri));};
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
We have currently an API platform based on HapiJS (v16.5.2), using good (v7.3.0) and wreck (v10.0.0).
This stack allows use a lot of logs based on good and the support of wreck events.
So the monitoring/instrumentation is ease.
With the lastest version, the wreck event are no more supported from hapi/good (hapijs/good#568).
Do you thinks it's possible to expose the wreck configuration accessible from the h2o2 package configuration ?
I'm pretty new in NodeJs, so if I miss somethings don't hesitate to fix me 😄
My workaround is to duplicate the reverse proxy mechanism in h2o2 and add the following code to activate the wreck log mechanism.
Configuration of wreck event :
Subscribe to wreck event (in this case, the response)
Register a new event named
custom
in Hapi serverRaised a
custom
event server in the wreck handlerThe text was updated successfully, but these errors were encountered: