-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: gracefully handle process metrics registration failure on unsupported OSes #14319
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
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (84.61%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #14319 +/- ##
==========================================
- Coverage 91.82% 91.81% -0.02%
==========================================
Files 677 677
Lines 42679 42690 +11
==========================================
+ Hits 39192 39195 +3
- Misses 2429 2434 +5
- Partials 1058 1061 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 31.69%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | BenchmarkLogsMarshalJSON |
3.8 µs | 3 µs | +29.35% |
| ⚡ | BenchmarkMetricsMarshalJSON |
5.2 µs | 3.9 µs | +31.69% |
| ⚡ | BenchmarkTracesMarshalJSON |
6 µs | 4.6 µs | +28.28% |
Comparing EdgeN8v:fix/14307-aix-crash (b74324a) with main (0550b08)
Footnotes
-
20 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
@EdgeN8v please fix CI. It seems the code is not formatted properly - you should be able to fix that by running |
|
@axw Done. I've ran make fmt. |
Co-authored-by: Damien Mathieu <[email protected]>
evan-bradley
left a comment
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.
Thank you for working to address this @EdgeN8v.
Since we have a while until the next release, I'd like to see if we can more robustly address this. If someone else would like to get this in and revisit it later, feel free to dismiss my review.
Co-authored-by: Evan Bradley <[email protected]>
|
Your latest changes removed the warning when the metrics are disabled. We do want that behavior. |
bb60049 to
1564d8f
Compare
81bf75a to
375318d
Compare
375318d to
24ba878
Compare
evan-bradley
left a comment
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.
Thanks @EdgeN8v!
Allows mocking the registration function to verify error handling in New.
71adbd3 to
30d4877
Compare
dmathieu
left a comment
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.
If you keep making changes to approved PRs, it will never be merged.
|
@dmathieu Apologies for the noise. I misunderstood and thought additional updates were still needed even after the PR was marked ready. I’ve reverted back to the approved state and won’t make further changes unless requested. |
e9ce4c9
Description
This PR addresses the crash issue reported in #14307 where the collector fails to start on unsupported operating systems (e.g., AIX) due to
RegisterProcessMetricsreturning an error.Instead of failing the service initialization, this change logs a warning and allows the collector to continue starting, ensuring that core functionality remains available even if process metrics cannot be collected.
Link to Issue
Fixes #14307
Type of change