:dizzy: NClient is an automatic type-safe .Net HTTP client that allows you to call web service API methods using annotated interfaces or controllers without boilerplate code.
This allows to collect more telemetry about the request for monitoring and investigation of problems. This will be helpful for usage of NClient, as well as for the development and debugging of the library.
Considering two user cases, I suggest making two types of activities: public and internal.
One public activity is enough. It will show the execution time of the client's method. It is important to measure the execution of the interface method, not just interceptor. This can probably be done with ProcessingAsyncInterceptor<TState>, which should be used here.
Ideally, each type of provider should have its own activity, but this is not required yet, so I suggest adding only one. It will measure the execution time of the transport request that occurs here.
This allows to collect more telemetry about the request for monitoring and investigation of problems. This will be helpful for usage of NClient, as well as for the development and debugging of the library.
Considering two user cases, I suggest making two types of activities: public and internal.
ProcessingAsyncInterceptor<TState>
, which should be used here.Additional links:
Activity
: https://docs.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-concepts