-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: make metrics build specific #237
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #237 +/- ##
==========================================
- Coverage 59.89% 58.61% -1.29%
==========================================
Files 70 71 +1
Lines 2364 2375 +11
==========================================
- Hits 1416 1392 -24
- Misses 863 903 +40
+ Partials 85 80 -5 ☔ View full report in Codecov by Sentry. |
done reviewing, missed this earlier |
@shashank11p @puneet-traceable pls take a look as well |
Adding some context here: The reason is that |
instrumentation/opentelemetry/internal/metrics/linux_metrics.go
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry/internal/metrics/linux_metrics.go
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry/internal/metrics/linux_metrics.go
Outdated
Show resolved
Hide resolved
@thugrock7 Pls test it on windows as well |
return lm.cpuSecondsTotal | ||
} | ||
|
||
func (lm *linuxMetrics) processStatsFromPid(pid int) (*processStats, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no tests for this function? It's fine for this but in general for testing such scenarios
- either file should become a parameter to the function and then you can create custom files to test.
- can pass an io.Reader to the function to read file. (*os.File) implements an io.Reader. During test you can use a mock version.
Tested running this by http-server/client scenario on linux, Mac, windows. Works fine |
Description
CPU and memory metrics which are added, making them linux specific. For other platforms using no-op
Testing
Tested on Mac, linux