Add server side HTTP logging layer (#1550)
* Add `MakeFmt` trait which modifies `Display`/`Debug` implementations. * Add `http` wrappers which modify the `Debug` and `Display` implementations based on closures marking sensitivity. Each wrapper has an associated `MakeFmt` impl. * Add `InstrumentOperation` [tower::Service](https://docs.rs/tower/latest/tower/trait.Service.html) which logs requests and responses. Accepts a `MakeFmt` for each potentially sensitive component of the request/response. * Add [ServerHttpSensitivityGenerator.kt](https://github.com/awslabs/smithy-rs/compare/harryb/add-logging?expand=1#diff-a7ad7f28d152bba6f2a63f3bde498582d91c8f7ab9c2de0c7f4494d6fd1c02ff ) which generates marker closures from models. * Apply `InstrumentationOperation` to the `OperationHandler` using `MakeFmt`s using the marker closures. Co-authored-by:Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
Loading
Please register or sign in to comment