elastic / apm-agent-nodejs

https://www.elastic.co/guide/en/apm/agent/nodejs/current/index.html
BSD 2-Clause "Simplified" License
582 stars 224 forks source link

Where to store library specific context data? #11

Open watson opened 7 years ago

watson commented 7 years ago

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:

context.library.hapi.event = event

That however would mean custom logic in our Kibana plugin.

Related: elastic/apm-agent-nodejs#12

watson commented 5 years ago

Related: https://github.com/elastic/apm/issues/44