cmd/stcrashreceiver: Add tag for report type (crash/failure) (#7374)
This commit is contained in:
@@ -84,7 +84,7 @@ func handleFailureFn(dsn string) func(w http.ResponseWriter, req *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, r := range reports {
|
for _, r := range reports {
|
||||||
pkt := packet(version)
|
pkt := packet(version, "failure")
|
||||||
pkt.Message = r.Description
|
pkt.Message = r.Description
|
||||||
pkt.Extra = raven.Extra{
|
pkt.Extra = raven.Extra{
|
||||||
"count": r.Count,
|
"count": r.Count,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ func parseCrashReport(path string, report []byte) (*raven.Packet, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pkt := packet(version)
|
pkt := packet(version, "crash")
|
||||||
pkt.Message = string(subjectLine)
|
pkt.Message = string(subjectLine)
|
||||||
pkt.Extra = raven.Extra{
|
pkt.Extra = raven.Extra{
|
||||||
"url": reportServer + path,
|
"url": reportServer + path,
|
||||||
@@ -229,7 +229,7 @@ func parseVersion(line string) (version, error) {
|
|||||||
return v, nil
|
return v, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func packet(version version) *raven.Packet {
|
func packet(version version, reportType string) *raven.Packet {
|
||||||
pkt := &raven.Packet{
|
pkt := &raven.Packet{
|
||||||
Platform: "go",
|
Platform: "go",
|
||||||
Release: version.tag,
|
Release: version.tag,
|
||||||
@@ -242,6 +242,7 @@ func packet(version version) *raven.Packet {
|
|||||||
raven.Tag{Key: "goos", Value: version.goos},
|
raven.Tag{Key: "goos", Value: version.goos},
|
||||||
raven.Tag{Key: "goarch", Value: version.goarch},
|
raven.Tag{Key: "goarch", Value: version.goarch},
|
||||||
raven.Tag{Key: "builder", Value: version.builder},
|
raven.Tag{Key: "builder", Value: version.builder},
|
||||||
|
raven.Tag{Key: "report_type", Value: reportType},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if version.commit != "" {
|
if version.commit != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user