elastic / elastic/apm-agent-nodejs
is apm.currentTransaction set inside a hapi `server.events.on('response'` event?
Open
8.3-candidate
agent-nodejs
kibana
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
In discussion with @mshustov working on https://github.com/elastic/kibana/issues/102699 the `apm.currentTraceIds` inside a hapi server 'response' event are empty. Has the transaction already ended? Or is the run context just not bound to the 'response' server event. From a glance at the hapi instrumentation, I'm thinking the latter, but I need to play a bit to confirm.
If that is the case can we and do we want the transaction run context to be bound to the server 'response' event? How about to [other core server events](https://hapi.dev/api?v=20.2.0#-serverevents)?
Contributor guide
Assessment
This issue has not been assessed yet.