Skip to content

Proposal to simplify user-facing interfaces related to latency monitoring #5769

Open
@konjac

Description

@konjac

For the current implementation, a common task for latency monitoring will require 4 user-facing interfaces

  1. ILatencyContext which holds the context
  2. ILatencyContextProvider which creates LatencyContext
  3. ILatencyContextTokenIssuer which issues tokens for checkpoints/tags/measures.(BTW, There is an error in the document at README.md#latency-measurement. It is using ILatencyContext.GetCheckpointToken/GetMeasureToken. Both methods are actually defined in ILatencyContextTokenIssuer.)
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions