-
Notifications
You must be signed in to change notification settings - Fork 726
Update events #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update events #932
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We understand that this might be important for you, but this issue has been automatically marked as stale because it has not had recent activity either from our end or yours. Note: in the past months we have built a new client, that has just landed in master. If you want to open an issue or a pr for the legacy client, you should do that in https://github.com/elastic/elasticsearch-js-legacy |
We understand that this might be important for you, but this issue has been automatically marked as stale because it has not had recent activity either from our end or yours. Note: in the past months we have built a new client, that has just landed in master. If you want to open an issue or a pr for the legacy client, you should do that in https://github.com/elastic/elasticsearch-js-legacy |
This pr adds the
prepare-request
event, which comes very handy if someone needs to track when a request has started (therequest
event is emitted after the serialization and building the headers).prepare-request
emits an object with the following keys:meta
: all the metadata about the requestparams
: the parameters the user has passed to the APIoptions
: the custom options for the requestIn addition, if the serialization fails, the
request
event will be emitted with an error.The event flow now is:
prepare-request
request
sniff
(not guaranteed)resurrect
(not guaranteed)response
Related: #834 elastic/apm-agent-nodejs#968