elastic / elastic/apm-agent-nodejs
Where to store library specific context data?
Open
agent-nodejs
discuss
intake api
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
Currently we store hapi events under `context.custom`. This location is only supposed to be used for storing user provided data. The agent is not supposed to stored data here automatically:
https://github.com/elastic/apm-agent-nodejs/blob/a077ef5462153f8bffd070b8fc41215754b6590d/lib/instrumentation/modules/hapi.js#L28
Instead we should consider something like this:
```js
context.library.hapi.event = event
```
That however would mean custom logic in our Kibana plugin.
Related: elastic/apm-agent-nodejs#12
Contributor guide
Assessment
This issue has not been assessed yet.