Skip to content

Commit

Permalink
fix: always try to remap both span and error stacktraces (#12221)
Browse files Browse the repository at this point in the history
When an event contains both a span and an error, the error is ignored by the sourcemap
processor leading to stacktraces not being remapped.
  • Loading branch information
kruskall authored Dec 15, 2023
1 parent d636ad3 commit 8f10084
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/sourcemap/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ func (p BatchProcessor) ProcessBatch(ctx context.Context, batch *modelpb.Batch)
if event.GetService().GetName() == "" || event.GetService().GetVersion() == "" {
continue
}
switch {
case event.Span != nil:
if event.Span != nil {
p.processStacktraceFrames(ctx, event.Service, event.Span.Stacktrace...)
case event.Error != nil:
}
if event.Error != nil {
if event.Error.Log != nil {
p.processStacktraceFrames(ctx, event.Service, event.Error.Log.Stacktrace...)
}
Expand Down

0 comments on commit 8f10084

Please sign in to comment.