Skip to content

Commit

Permalink
fix: always try to remap both span and error stacktraces (#12221) (#1…
Browse files Browse the repository at this point in the history
…2331)

When an event contains both a span and an error, the error is ignored by the sourcemap
processor leading to stacktraces not being remapped.

(cherry picked from commit 8f10084)

Co-authored-by: kruskall <[email protected]>
  • Loading branch information
mergify[bot] and kruskall authored Jan 3, 2024
1 parent db730dd commit 8222e01
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 8222e01

Please sign in to comment.