{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/node/issues/3733","labels_url":"https://api.github.com/repos/joyent/node/issues/3733/labels{/name}","comments_url":"https://api.github.com/repos/joyent/node/issues/3733/comments","events_url":"https://api.github.com/repos/joyent/node/issues/3733/events","html_url":"https://github.com/joyent/node/issues/3733","id":5693699,"number":3733,"title":"Implicit asynchronous context","user":{"login":"eladb","id":598796,"avatar_url":"https://avatars.githubusercontent.com/u/598796?v=3","gravatar_id":"","url":"https://api.github.com/users/eladb","html_url":"https://github.com/eladb","followers_url":"https://api.github.com/users/eladb/followers","following_url":"https://api.github.com/users/eladb/following{/other_user}","gists_url":"https://api.github.com/users/eladb/gists{/gist_id}","starred_url":"https://api.github.com/users/eladb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eladb/subscriptions","organizations_url":"https://api.github.com/users/eladb/orgs","repos_url":"https://api.github.com/users/eladb/repos","events_url":"https://api.github.com/users/eladb/events{/privacy}","received_events_url":"https://api.github.com/users/eladb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joyent/node/labels/asynclistener","name":"asynclistener","color":"e11d21"},{"url":"https://api.github.com/repos/joyent/node/labels/feature-request","name":"feature-request","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2012-07-18T16:35:39Z","updated_at":"2015-06-24T16:59:26Z","closed_at":null,"body":"_In continuation to https://groups.google.com/d/topic/nodejs-dev/gBpJeQr0fWM/discussion_\n\nMost environments provide some form of ability to push implicit information into the execution context. In multithreaded environments, it is usually some form of storage associated with the current thread and which can be accessed by code anywhere in the program. See [Thread Local Storage](http://en.wikipedia.org/wiki/Thread-local_storage) for details.\n\nThis mechanism enables use cases where it is impossible to pass along data across a call chain from one layer to another in the execution flow (consider the use of many libraries throughout the chain). Common examples are instrumentation and debugging tools like logging and performance counters that need to be associated with the current flow but are usually implemented in a central location within the codebase. For example, one might want to automatically associate a request ID with each emitted log line. The request ID will be added to the execution context when the request comes in and the logging library will extract it and emit it with the log line.\n\nI think that node should enable those scenarios by providing a mechanism to associate data implicitly into the current execution context and extract them along the way. Because of the asynchronous nature of node, this data should traverse async hops in a similar fashion to [Domains](http://nodejs.org/docs/latest/api/all.html#all_domain)."},"comment":{"url":"https://api.github.com/repos/joyent/node/issues/comments/114941715","html_url":"https://github.com/joyent/node/issues/3733#issuecomment-114941715","issue_url":"https://api.github.com/repos/joyent/node/issues/3733","id":114941715,"user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T16:59:26Z","updated_at":"2015-06-24T16:59:26Z","body":"Ok. I'm leaning towards just closing this one then. If someone wishes to pursue, we can reopen if necessary."}}