amzn / smoke-framework

A light-weight server-side service framework written in the Swift programming language.
Apache License 2.0
1.44k stars 41 forks source link

Avoid logging pings and move some logging to trace. #97

Closed tachyonics closed 2 years ago

tachyonics commented 2 years ago

Issue #, if available:

Description of changes:

  1. Avoid logging pings. A reportRequest function is passed into HTTP1OperationRequestHandler.handle allowing the conforming type to choose when to report the request start to the OperationTraceContext. By default (in StandardHTTP1OperationRequestHandler) this function will only be called if the request is not a ping.
  2. StandardHTTP1ResponseHandler. handleComplete takes an additional reportCompletion parameter, which if false will not report request completion to the OperationTraceContext.
  3. Reduce a number of logging statements from debug to 'trace`
  4. Reduce the log statement in StandardHTTP1ResponseHandler.complete from info to trace as it is duplicated by any logging in the OperationTraceContext

This is a breaking change and will be part of the next major version, 3.X.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.