Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Add more telemetry for monitoring. #575

Merged
merged 2 commits into from
Oct 9, 2018
Merged

Conversation

cristinamanum
Copy link
Contributor

Add few more data points to be exported in Geneva.

return ValidationResult.FailedWithIssues(ValidationIssue.SymbolErrorCode_ChecksumDoesNotMatch);
}
}
}
_telemetryService.TrackSymbolsValidationResultEvent(packageId, packageNormalizedVersion, ValidationStatus.Failed, "SymbolErrorCode_MatchingPortablePDBNotFound");
Copy link
Contributor

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.

Copy link
Contributor Author

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");

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(...) { ... }

Copy link
Contributor Author

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.

@cristinamanum cristinamanum merged commit dfdf05f into dev Oct 9, 2018
@cristinamanum cristinamanum deleted the cmanusymboltelemetry branch February 11, 2019 22:52
joelverhagen pushed a commit that referenced this pull request Sep 27, 2019
[ReleasePrep][2019.06.26]FI of master into dev
joelverhagen pushed a commit that referenced this pull request Oct 26, 2020
* Add more telemetry for monitoring.
joelverhagen pushed a commit that referenced this pull request Oct 26, 2020
[ReleasePrep][2019.06.26]FI of master into dev
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants