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

Adding metrics for request total, latency and size #177

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

courageJ
Copy link
Contributor

@courageJ courageJ commented Jan 9, 2025

The PR adds the metrics handler and basic metrics for requests.

The request latency metrics now will only work if the response mode is buffered.

The request counter only covers the success case now. A follow-up PR will be added to record request errors and update to record request counter for failure cases.

Copy link

linux-foundation-easycla bot commented Jan 9, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 9, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @courageJ. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 9, 2025
@courageJ
Copy link
Contributor Author

courageJ commented Jan 9, 2025

cc @liu-cong @ahg-g

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 10, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 10, 2025
@courageJ
Copy link
Contributor Author

cc @JeffLuoo

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2025
@liu-cong
Copy link
Contributor

/assign

pkg/ext-proc/handlers/server.go Show resolved Hide resolved
pkg/manifests/ext_proc.yaml Outdated Show resolved Hide resolved
pkg/ext-proc/metrics/metrics.go Show resolved Hide resolved
Copy link
Contributor

@liu-cong liu-cong left a comment

Choose a reason for hiding this comment

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

A small comment, otherwise lgtm

pkg/ext-proc/handlers/server.go Outdated Show resolved Hide resolved
@liu-cong
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 13, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 13, 2025
@courageJ
Copy link
Contributor Author

/assign @terrytangyuan

@ahg-g
Copy link
Contributor

ahg-g commented Jan 14, 2025

/hold

I would like to take a look, I will do so tomorrow if you don't mind

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 14, 2025
@ahg-g
Copy link
Contributor

ahg-g commented Jan 15, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 15, 2025
pkg/ext-proc/handlers/response.go Show resolved Hide resolved
pkg/ext-proc/main.go Outdated Show resolved Hide resolved
pkg/ext-proc/metrics/metrics_handler.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 16, 2025
Copy link

netlify bot commented Jan 16, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit c9a81c7
🔍 Latest deploy log https://app.netlify.com/sites/gateway-api-inference-extension/deploys/678ed549d8be650008c4124e
😎 Deploy Preview https://deploy-preview-177--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2025
@courageJ courageJ force-pushed the metrics1 branch 2 times, most recently from 3713596 to a93aa22 Compare January 20, 2025 17:26
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2025
pkg/ext-proc/main.go Outdated Show resolved Hide resolved
pkg/ext-proc/main.go Outdated Show resolved Hide resolved
docs/metrics/README.md Outdated Show resolved Hide resolved
@courageJ courageJ force-pushed the metrics1 branch 2 times, most recently from 3ab406c to b324502 Compare January 20, 2025 22:57
Signed-off-by: Jie WU <wujie@google.com>

add request metrics

Signed-off-by: Jie WU <wujie@google.com>

rename api and metrics

fix go mod

Adding metrics handler

Signed-off-by: Jie WU <wujie@google.com>

Adding metrics handler

Signed-off-by: Jie WU <wujie@google.com>

add request metrics

rename api and metrics

fix mod

Updated request metrics to be handled in server processing loop

Signed-off-by: Jie WU <wujie@google.com>

Updated request metrics to be handled in server processing loop

Signed-off-by: Jie WU <wujie@google.com>

fix go mod

Signed-off-by: Jie WU <wujie@google.com>

fix go mod

Signed-off-by: Jie WU <wujie@google.com>

remove preconfigured buffered response

Signed-off-by: Jie WU <wujie@google.com>

Add streamed response

Signed-off-by: Jie WU <wujie@google.com>

Handle latency with response

Signed-off-by: Jie WU <wujie@google.com>

refactor

Signed-off-by: Jie WU <wujie@google.com>

fmt

Signed-off-by: Jie WU <wujie@google.com>

fmt

Signed-off-by: Jie WU <wujie@google.com>

fmt

Signed-off-by: Jie WU <wujie@google.com>

refactor server

Signed-off-by: Jie WU <wujie@google.com>

metrics auth

add docs and go mod tidy

refactor

move file

move file
@ahg-g
Copy link
Contributor

ahg-g commented Jan 21, 2025

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 21, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, courageJ, liu-cong

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2025
@k8s-ci-robot k8s-ci-robot merged commit bbac779 into kubernetes-sigs:main Jan 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants