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
{{ message }}
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
As described by @AdriVanHoudt on PR PR 379:
"In hapi there is a concept of
tailswhere you can still do stuff in your handler after you replied.In this case you end the span when you call
reply. I have some routes where I do some queries after replying for performance reasons and it would be great if those queries would also end up in the trace of that request.Would it be possible to integrate this? You have access to the full request object on that event and it is fired only once per request.
See https://github.com/hapijs/hapi/blob/master/API.md#server-events and https://github.com/hapijs/hapi/blob/master/API.md#requesttailname for more info.
And https://pbs.twimg.com/media/CL-bp3_W8AAimRi.png:large for a nice overview of how the hapi lifecycle works"