-
Notifications
You must be signed in to change notification settings - Fork 466
Add DiskInfo to HeartBeat #536
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,6 +344,11 @@ public EventMetadata GetMetadataForHeartBeat(ref EventLevel eventLevel) | |
| } | ||
|
|
||
| metadata.Add(nameof(RepoMetadata.Instance.EnlistmentId), RepoMetadata.Instance.EnlistmentId); | ||
| metadata.Add( | ||
| "PhysicalDiskInfo", | ||
| GVFSPlatform.Instance.GetPhysicalDiskInfo( | ||
| this.context.Enlistment.WorkingDirectoryRoot, | ||
| sizeStatsOnly: true)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be overkill for this PR, but should we set If we can reliably find a user's telemetry data this would be less important.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I don't think you need to block the PR on this, as the current changes are an improvement)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wilbaker it gets a little tricky only because we're cross plat and there's no contract on whats coming back in the map exactly. Definitely something good to think about for the future! |
||
|
|
||
| return metadata; | ||
| } | ||
|
|
||
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.
Not all your doing, but this method is quite long, does two separate things, and now with an exit in the middle, can be pretty hard to follow. I would split it into two new methods, so that this top level method can call the first, then early exit if needed, and then call the second.