mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-31 10:58:27 +00:00
cmd/stcrashreceiver: Add tag for report type (crash/failure) (#7374)
This commit is contained in:
parent
342ade501a
commit
0970aed596
@ -84,7 +84,7 @@ func handleFailureFn(dsn string) func(w http.ResponseWriter, req *http.Request)
|
||||
return
|
||||
}
|
||||
for _, r := range reports {
|
||||
pkt := packet(version)
|
||||
pkt := packet(version, "failure")
|
||||
pkt.Message = r.Description
|
||||
pkt.Extra = raven.Extra{
|
||||
"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.Extra = raven.Extra{
|
||||
"url": reportServer + path,
|
||||
@ -229,7 +229,7 @@ func parseVersion(line string) (version, error) {
|
||||
return v, nil
|
||||
}
|
||||
|
||||
func packet(version version) *raven.Packet {
|
||||
func packet(version version, reportType string) *raven.Packet {
|
||||
pkt := &raven.Packet{
|
||||
Platform: "go",
|
||||
Release: version.tag,
|
||||
@ -242,6 +242,7 @@ func packet(version version) *raven.Packet {
|
||||
raven.Tag{Key: "goos", Value: version.goos},
|
||||
raven.Tag{Key: "goarch", Value: version.goarch},
|
||||
raven.Tag{Key: "builder", Value: version.builder},
|
||||
raven.Tag{Key: "report_type", Value: reportType},
|
||||
},
|
||||
}
|
||||
if version.commit != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user