-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add options for client and server tracing to skip client errs (#9)
* Add options for client and server tracing to skip client errs This change introduces two configuration options, one for the server hooks, and one for the client, which configure whether client-class errors (4xx) are recorded as "error: true" in the span. Often times, client errors are expected behavior from the perspective of the service, and having them report as errors to trace collectors can obfuscate real service issues. This is implemented using a functional options paradigm with var args, which maintains backwards compatibility. Current users will see no change to behavior or method signatures when updating. * Pull client options into a dedicated struct within the TraceHTTPClient * Move server side trace opts into dedicated struct In response to PR feedback, moves the server side configuraiton into a dedicated struct, and introduces an adapter hook type to configure the behavior of the hooks correctly based on the the configuration options. * Consolidate options structs
- Loading branch information
Showing
4 changed files
with
138 additions
and
48 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