Skip to content

Commit

Permalink
fix(backend): proceed with event ingestion on symbolication failure
Browse files Browse the repository at this point in the history
fixes #1016
  • Loading branch information
anupcowkur committed Aug 26, 2024
1 parent 53a6b33 commit 5981ba1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions backend/api/measure/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -1867,25 +1867,21 @@ func PutEvents(c *gin.Context) {
_, symbolicationSpan := symbolicationTracer.Start(ctx, "symbolicate-events")

for i := range batches {
// If symoblication fails for whole batch, continue
if err := symbolicator.Symbolicate(ctx, batches[i]); err != nil {
msg := `failed to symbolicate batch`
fmt.Println(msg, err)
c.JSON(http.StatusInternalServerError, gin.H{
"error": msg,
"details": err.Error(),
})
symbolicationSpan.End()
return
continue
}

// handle symbolication errors
// If symbolication succeeds but has errors while decoding individual frames, log them and proceed
if len(batches[i].Errs) > 0 {
for _, err := range batches[i].Errs {
fmt.Println("symbolication err: ", err.Error())
}
}

// rewrite symbolicated events
// rewrite symbolicated events to event request
for j := range batches[i].Events {
eventId := batches[i].Events[j].ID
idx, exists := eventReq.symbolicate[eventId]
Expand Down

0 comments on commit 5981ba1

Please sign in to comment.