-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: add support for before/after hooks to support tracing outbound requests #156
base: master
Are you sure you want to change the base?
Conversation
5c908a1
to
f57c997
Compare
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.
Awesome work! This looks great!
Hey @joshwilsdon, let's continue the convo here. I rebased against master so this should be in a good place now. For context, we're looking at building a custom REST client for internal use and we need to do some pretty low level metrics and error logging. That's not currently possible without doing something intrusive like extending directly from JSONClient and overriding existing class methods. These life cycle hooks are a good alternative. The one thing I would want to add in this PR is the ability for Since |
} | ||
cb(); | ||
}, before: function (opts, cb) { | ||
beforeRan = true; |
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.
can we add more assertation around opts?
To be sure that this is the complete opts
object, not just the subset of it.
Would be nice to create an |
Carries #95 over the finish line - would like to get input from the peanut gallery. This should dove tail nicely with our metrics needs as well.