facebookincubator / below

A time traveling resource monitor for modern Linux systems
Apache License 2.0
1.04k stars 60 forks source link

Handle network stats parsing gracefully #8212

Closed mmynk closed 10 months ago

mmynk commented 11 months ago

Goal: Error in recording one of the network stats should not result in completely empty network stats.

A process died and recording snpm6 stats failed for that process which resulted in none of network stats being recorded. Error:

Sep 26 21:11:49 ip-10-66-6-18 below[21496]: Sep 27 04:11:49.866 ERRO Os { code: 2, kind: NotFound, message: "No such file or directory" }: "/proc/21496/net/snmp6"
facebook-github-bot commented 11 months ago

@brianc118 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

mmynk commented 11 months ago

@dxu i think it should be worth adding since we're only logging the errors, however it will be logged at every sample collection instance

facebook-github-bot commented 11 months ago

@brianc118 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

brianc118 commented 11 months ago

Agreed with Daniel here, we probably should not be logging from this crate

mmynk commented 11 months ago

@brianc118 could you please take a look again if the changes look good now? thanks!

mmynk commented 11 months ago

@brianc118 thanks! addressed the comments.

facebook-github-bot commented 10 months ago

@brianc118 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

mmynk commented 10 months ago

@brianc118 not sure why linter is failing, rustfmt doesn't complain on any of the changed files.

facebook-github-bot commented 10 months ago

@brianc118 merged this pull request in facebookincubator/below@4bef99f6c298364ba00e955b878b3473bca92fc1.