-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
request_begin
instrumentation callback
Adds a new instrumentation callback called `request_begin` which, as the name suggests, is invoked before an HTTP request is dispatched. As outlined originally in #900, the idea is that this will enable a set of hooks that can be used for distributed tracing. The PR also renames the existing `request` callback to `request_end`, although the old name is still invoked for the time being for backwards compatibility. A special `user_data` property is passed to `request_begin` which allows subscribers to set custom data that will be passed through to `request_end` for any given request. This allows, for example, a user assigned ID to be set for the request and recognized on both ends. I chose the naming `_begin` and `_end` (as opposed to start/finish or any other combination) based on the naming conventions of Ruby itself. Fixes #900.
- Loading branch information
Showing
5 changed files
with
186 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters