kmesh icon indicating copy to clipboard operation
kmesh copied to clipboard

bpf log improve

Open hzxuzhonghu opened this issue 1 year ago • 4 comments

What type of PR is this?

What this PR does / why we need it:

replace the ID to its original resource name.

[SERVICE_ID] %u [BACKEND_UID] %u

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


hzxuzhonghu avatar Dec 20 '24 09:12 hzxuzhonghu

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from hzxuzhonghu. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

kmesh-bot avatar Dec 20 '24 09:12 kmesh-bot

now the logs look like


time="2024-12-20T09:02:12Z" level=info msg="[KMESH] DEBUG: origin dst addr=[10.96.131.116:9080]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: [SERVICE_ID] default/productpage.default.svc.cluster.local lb policy [0]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: [SERVICE_ID] default/productpage.default.svc.cluster.local lb_random_handle select endpoint [1]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[BACKEND] DEBUG: [SERVICE_ID] default/productpage.default.svc.cluster.local dnat to [10.244.1.238:9080]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[KMESH] DEBUG: origin dst addr=[10.96.198.194:9080]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: [SERVICE_ID] default/details.default.svc.cluster.local lb policy [0]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: [SERVICE_ID] default/details.default.svc.cluster.local lb_random_handle select endpoint [1]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[BACKEND] DEBUG: [SERVICE_ID] default/details.default.svc.cluster.local dnat to [10.244.1.197:9080]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[KMESH] DEBUG: origin dst addr=[10.96.188.208:9080]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: find waypoint addr=[10.96.26.149:15008]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[KMESH] DEBUG: origin dst addr=[10.96.26.149:15008]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: [SERVICE_ID] default/reviews-svc-waypoint.default.svc.cluster.local lb policy [2]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SERVICE] DEBUG: [SERVICE_ID] default/reviews-svc-waypoint.default.svc.cluster.local locality lb failover select endpoint [0/1]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[BACKEND] DEBUG: [SERVICE_ID] default/reviews-svc-waypoint.default.svc.cluster.local dnat to [10.244.1.204:15019]" subsys=ebpf
time="2024-12-20T09:02:12Z" level=info msg="[SENDMSG] DEBUG: send to 10.96.188.208 do tlv encoding with org dst 10.96.188.208:9080..." subsys=ebpf

hzxuzhonghu avatar Dec 20 '24 09:12 hzxuzhonghu

Codecov Report

:x: Patch coverage is 50.68493% with 36 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 49.45%. Comparing base (76af08c) to head (7b93f77). :warning: Report is 608 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/logger/controller.go 46.00% 26 Missing and 1 partial :warning:
pkg/utils/hash_name.go 73.68% 5 Missing :warning:
pkg/controller/controller.go 0.00% 4 Missing :warning:

:x: Your patch check has failed because the patch coverage (50.68%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Files with missing lines Coverage Δ
pkg/logger/logger.go 72.34% <ø> (+27.60%) :arrow_up:
pkg/controller/controller.go 0.00% <0.00%> (ø)
pkg/utils/hash_name.go 67.74% <73.68%> (-8.51%) :arrow_down:
pkg/controller/logger/controller.go 46.00% <46.00%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7425245...7b93f77. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 23 '24 03:12 codecov[bot]

/hold

hzxuzhonghu avatar Jan 03 '25 03:01 hzxuzhonghu