Skip to content

Add service metric and use ringbuf to report metrics#688

Merged
kmesh-bot merged 11 commits intokmesh-net:mainfrom
LiZhenCheng9527:add-service-metric
Aug 7, 2024
Merged

Add service metric and use ringbuf to report metrics#688
kmesh-bot merged 11 commits intokmesh-net:mainfrom
LiZhenCheng9527:add-service-metric

Conversation

@LiZhenCheng9527
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind enhancement
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@codecov
Copy link
Copy Markdown

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 51.63043% with 89 lines in your changes missing coverage. Please review.

Project coverage is 51.01%. Comparing base (e771c67) to head (42f3aaa).
Report is 23 commits behind head on main.

Files Patch % Lines
pkg/controller/telemetry/metric.go 48.68% 72 Missing and 6 partials ⚠️
pkg/controller/telemetry/utils.go 69.23% 4 Missing and 4 partials ⚠️
pkg/controller/workload/workload_processor.go 0.00% 2 Missing ⚠️
pkg/controller/workload/workload_controller.go 0.00% 1 Missing ⚠️
Files Coverage Δ
pkg/auth/rbac.go 79.77% <100.00%> (ø)
pkg/auth/xdp_auth_handler.go 71.42% <100.00%> (ø)
pkg/controller/workload/workload_controller.go 64.58% <0.00%> (ø)
pkg/controller/workload/workload_processor.go 58.89% <0.00%> (-0.29%) ⬇️
pkg/controller/telemetry/utils.go 71.42% <69.23%> (-5.05%) ⬇️
pkg/controller/telemetry/metric.go 51.59% <48.68%> (-2.19%) ⬇️

... and 2 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 dc9d77e...42f3aaa. Read the comment docs.

log.Warnf("reporter records error")
}
workloadLabels := m.buildWorkloadMetric(&data)
serviceLabels := m.buildServiceMetric(&data)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

donot we have a test on this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You mean the UT test?

@kmesh-bot kmesh-bot added size/XXL and removed size/XL labels Aug 7, 2024
nlgwcy added 2 commits August 7, 2024 14:53
Signed-off-by: wuchangye <wuchangye@huawei.com>
Signed-off-by: wuchangye <wuchangye@huawei.com>
nlgwcy and others added 7 commits August 7, 2024 14:53
Signed-off-by: wuchangye <wuchangye@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
@LiZhenCheng9527 LiZhenCheng9527 force-pushed the add-service-metric branch 2 times, most recently from f4ca063 to ebd9963 Compare August 7, 2024 07:01
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Copy link
Copy Markdown
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@kmesh-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

The pull request process is described here

Details 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 kmesh-bot merged commit ee20a00 into kmesh-net:main Aug 7, 2024
@kmesh-bot
Copy link
Copy Markdown
Collaborator

In response to a cherrypick label: #688 failed to apply on top of branch "release-0.4":

Applying: Unified reporting of metrics/logs: remove metrics report
Using index info to reconstruct a base tree...
M	bpf/kmesh/probes/metrics.h
M	bpf/kmesh/probes/probe.h
Falling back to patching base and 3-way merge...
Auto-merging bpf/kmesh/probes/probe.h
CONFLICT (modify/delete): bpf/kmesh/probes/metrics.h deleted in Unified reporting of metrics/logs: remove metrics report and modified in HEAD. Version HEAD of bpf/kmesh/probes/metrics.h left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Unified reporting of metrics/logs: remove metrics report
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

@kmesh-bot
Copy link
Copy Markdown
Collaborator

In response to a cherrypick label: new issue created for failed cherrypick: #701

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants