Skip to content

Add perfinsights middleware which writes the latency of API calls #2383

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

josephschorr
Copy link
Member

to a new native histogram bucket

Should help users determine top-line API latency

@josephschorr josephschorr requested a review from a team as a code owner May 7, 2025 20:42
@github-actions github-actions bot added area/cli Affects the command line area/api v1 Affects the v1 API area/dependencies Affects dependencies labels May 7, 2025
Copy link
Contributor

@vroldanbet vroldanbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Mostly nits!

}

// UnaryServerInterceptor returns a gRPC server-side interceptor that provides reporting for Unary RPCs.
func UnaryServerInterceptor(isEnabled bool) grpc.UnaryServerInterceptor {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a unit test that mounts this interceptor over a gRPC server and confirms a request generates the metrics

@josephschorr
Copy link
Member Author

Updated

vroldanbet
vroldanbet previously approved these changes May 9, 2025
@github-actions github-actions bot added the area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) label May 9, 2025
to a new native histogram bucket

Should help users determine top-line API latency
@josephschorr josephschorr added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@josephschorr josephschorr added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@josephschorr josephschorr added this pull request to the merge queue May 9, 2025
Merged via the queue into authzed:main with commit 8e279f3 May 9, 2025
41 checks passed
@josephschorr josephschorr deleted the perf-insights branch May 9, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api v1 Affects the v1 API area/cli Affects the command line area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants