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

Process network metrics #925

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Process network metrics #925

merged 3 commits into from
Jun 14, 2024

Conversation

mariomac
Copy link
Contributor

process.network.io metric, which can be aggregated by network.io.direction=transmit/receive

@mariomac mariomac requested review from grcevski and marctc as code owners June 13, 2024 08:24
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 8 lines in your changes missing coverage. Please review.

Project coverage is 79.22%. Comparing base (5c20f6f) to head (0e8fc6c).

Files Patch % Lines
pkg/internal/export/otel/metrics_proc.go 86.95% 2 Missing and 1 partial ⚠️
pkg/internal/infraolly/process/harvest.go 75.00% 2 Missing and 1 partial ⚠️
pkg/internal/infraolly/process/snapshot.go 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #925      +/-   ##
==========================================
+ Coverage   72.28%   79.22%   +6.94%     
==========================================
  Files         130      131       +1     
  Lines       10026    10104      +78     
==========================================
+ Hits         7247     8005     +758     
+ Misses       2166     1593     -573     
+ Partials      613      506     -107     
Flag Coverage Δ
integration-test 55.32% <76.38%> (+0.23%) ⬆️
k8s-integration-test 59.29% <76.38%> (+<0.01%) ⬆️
oats-test 35.52% <2.77%> (-0.23%) ⬇️
unittests 46.02% <88.88%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! Looks great, one minor comment about testing of the network file parser.

@@ -218,3 +218,17 @@ func Test_usernameFromGetent(t *testing.T) { //nolint:paralleltest
})
}
}

func TestNetworkBytes(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we can add a test for bad input there? Like, empty strings, characters instead of numbers etc. I know it's unlikely, but just to be 100% certain we won't panic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

@mariomac mariomac merged commit b73549b into grafana:main Jun 14, 2024
6 checks passed
@mariomac mariomac deleted the proc-net branch June 14, 2024 13:43
bareckidarek added a commit to bareckidarek/beyla that referenced this pull request Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants