Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
konjac opened this issue Jan 5, 2025 · 0 comments
Open

Comments

@konjac
Copy link

konjac commented Jan 5, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant