Open
Description
For the current implementation, a common task for latency monitoring will require 4 user-facing interfaces
ILatencyContext
which holds the contextILatencyContextProvider
which createsLatencyContext
ILatencyContextTokenIssuer
which issues tokens forcheckpoints/tags/measures
.(BTW, There is an error in the document at README.md#latency-measurement. It is usingILatencyContext.GetCheckpointToken/GetMeasureToken
. Both methods are actually defined inILatencyContextTokenIssuer
.)ILatencyDataExporter
which exports latency data.
So the monitored code should always inject 3 interfaces(No.2~4), which is quite wordy. What's more the implementation of LatencyContextTokenIssuer
and LatencyContext
create their own CheckpointTracker/MeasureTracker/TagCollection
which is redundancy.
I would like to propose merge ILatencyContextTokenIssuer/ILatencyDataExporter
into ILatencyContext
. LatencyContext
can hold references to ILatencyContextTokenIssuer/ILatencyDataExporter
. Then it becomes the only entrance to issue token and export data.