v0.3.0: 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