Skip to content

Using Activity for requests #453

@smolchanovsky

Description

@smolchanovsky

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.

  1. 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.
  2. 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.

Additional links:

  1. Basic information about Activity: https://docs.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-concepts
  2. Usage example: https://jimmybogard.com/activity-enrichment-in-asp-net-core-6-0/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions