menes-dotnet/Menes

Consider refactoring logging/diagnostics in OpenApiOperationInvoker

idg10 opened this issue · 0 comments

idg10 commented

The OpenApiOperationInvoker type's operation is somewhat obscured by the clutter from logging, auditing, and monitoring instrumentation. This makes it harder to see what the intention is for the basic operation.

We should consider whether it would be better to define an additional interface that enables the invoker to say what it's doing at each stage without it needing to care what actually gets reported where. This way, the operation invoker could focus on the business of invoking operations, and a separate class could determine what gets reported where.

I'm not sure whether this would be an improvement or not. I started to get uncomfortable with the state it's in when adding the instrumentation for #8 but didn't want to roll this refactoring into that change, since it's not a slam dunk.