Merge pull request #29 from navi-ppl/TP-5555/hotfix-symbolicator
TP-5555 | cybertron symbolicator fix
This commit is contained in:
@@ -92,6 +92,13 @@ func extractPlatform(url string) string {
|
||||
return "WEB"
|
||||
}
|
||||
|
||||
func getSignificantStack(trace symbolicator.SymbolicatedStackTrace) string {
|
||||
if len(trace.Frames) != 0 {
|
||||
return trace.Frames[len(trace.Frames)-1].Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (ep *ErrorProcessor) ProcessError(error []byte) {
|
||||
ep.logger.Info("processing error in consumer")
|
||||
var payload Exception
|
||||
@@ -164,6 +171,7 @@ func (ep *ErrorProcessor) ProcessError(error []byte) {
|
||||
if err != nil {
|
||||
ep.logger.Error("error occured in symobilicator client", zap.Error(err))
|
||||
}
|
||||
|
||||
//make md5 hash of error
|
||||
hash := encoder.Md5Encode(string(frames))
|
||||
//creating es document
|
||||
@@ -172,7 +180,7 @@ func (ep *ErrorProcessor) ProcessError(error []byte) {
|
||||
Error: payload.Value,
|
||||
Title: payload.Type,
|
||||
StackTrace: output.Frames,
|
||||
SignificantStack: output.Frames[len(output.Frames)-1].Token,
|
||||
SignificantStack: getSignificantStack(output),
|
||||
ErrorHash: hash,
|
||||
ProjectId: payload.ProjectId,
|
||||
ReleaseVersion: releaseId,
|
||||
|
||||
Reference in New Issue
Block a user