in appinsights/contracts/exceptiondata.go [49:86]
func (data *ExceptionData) Sanitize() []string {
var warnings []string
for _, ptr := range data.Exceptions {
warnings = append(warnings, ptr.Sanitize()...)
}
if len(data.ProblemId) > 1024 {
data.ProblemId = data.ProblemId[:1024]
warnings = append(warnings, "ExceptionData.ProblemId exceeded maximum length of 1024")
}
if data.Properties != nil {
for k, v := range data.Properties {
if len(v) > 8192 {
data.Properties[k] = v[:8192]
warnings = append(warnings, "ExceptionData.Properties has value with length exceeding max of 8192: "+k)
}
if len(k) > 150 {
data.Properties[k[:150]] = data.Properties[k]
delete(data.Properties, k)
warnings = append(warnings, "ExceptionData.Properties has key with length exceeding max of 150: "+k)
}
}
}
if data.Measurements != nil {
for k, v := range data.Measurements {
if len(k) > 150 {
data.Measurements[k[:150]] = v
delete(data.Measurements, k)
warnings = append(warnings, "ExceptionData.Measurements has key with length exceeding max of 150: "+k)
}
}
}
return warnings
}