-
Notifications
You must be signed in to change notification settings - Fork 21
Added logging of the request body when scanning request was marked as failed #131
Conversation
@agr, |
src/Validation.Common/TraceHelper.cs
Outdated
$"{{{TraceConstant.ValidatorName}}} " + | ||
$"ValidationId: {{{TraceConstant.ValidationId}}} " + | ||
$"for package {{{TraceConstant.PackageId}}} " + | ||
$"v.{{{TraceConstant.PackageVersion}}} " + |
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.
Non-standard to prepend v.
. {id} {version}
is fine.
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.
Removed
@@ -230,7 +241,7 @@ public void Configuration(IAppBuilder app) | |||
validationEntity.ValidatorCompleted(VcsValidator.ValidatorName, ValidationResult.Failed); | |||
await _packageValidationTable.StoreAsync(validationEntity); | |||
|
|||
_logger.TrackValidatorResult(VcsValidator.ValidatorName, validationId, ValidationResult.Failed.ToString(), validationEntity.PackageId, validationEntity.PackageVersion); | |||
_logger.TrackValidatorResult(VcsValidator.ValidatorName, validationId, ValidationResult.Failed.ToString(), validationEntity.PackageId, validationEntity.PackageVersion, body.Substring(0, ReasonableBodySize)); |
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.
Please append "(truncated)" when you truncate.
Will be able to see the full request body in blob storage?
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.
Added "(truncated)", put full body into blob.
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.
minor comments
Made body completely logged in audit blob.
… failed (#131) * Added logging of the request body when scanning request was marked as failed. * Removed "v." * Added method to truncate string. Made body completely logged in audit blob.
Logging more info for failed scans, to make investigations easier. #398