-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
return ValidationResult.FailedWithIssues(ValidationIssue.SymbolErrorCode_ChecksumDoesNotMatch); | ||
} | ||
} | ||
} | ||
_telemetryService.TrackSymbolsValidationResultEvent(packageId, packageNormalizedVersion, ValidationStatus.Failed, "SymbolErrorCode_MatchingPortablePDBNotFound"); |
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.
make the issue as the constant field or a new class with const string if you are incorporating multiple issues.
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 multiple issues currently.
@@ -76,6 +76,7 @@ public async Task<IValidationResult> ValidateSymbolsAsync(string packageId, stri | |||
{ | |||
if (!SymbolsHaveMatchingPEFiles(pdbs, pes)) | |||
{ | |||
_telemetryService.TrackSymbolsValidationResultEvent(packageId, packageNormalizedVersion, ValidationStatus.Failed, "SymbolErrorCode_MatchingPortablePDBNotFound"); |
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.
It may be better if you added a layer above this that tracked the telemetry rather than having to put a telemetry service call at every return.
You may have to add a reason string to the IValidationResult
but I think the code would be much cleaner.
E.g.
public async Task<IValidationResult> ValidateSymbolsAsync(...)
{
var result = await ValidateSymbolsInternal(...);
_telemetryService.TrackSymbolsValidationResultEvent(result);
}
public Task<IValidationResult> ValidateSymbolsInternal(...) { ... }
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.
I see your point. I prefer to not refactor too much for this change, If more data will be added will consider more refactoring at that point.
[ReleasePrep][2019.06.26]FI of master into dev
* Add more telemetry for monitoring.
[ReleasePrep][2019.06.26]FI of master into dev
Add few more data points to be exported in Geneva.