Skip to content

Commit

Permalink
fix otel exception message propagation (#13603)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubvs committed Aug 19, 2024
1 parent 82e7526 commit f8865c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion model/modelprocessor/errormessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s SetErrorMessage) ProcessBatch(ctx context.Context, b *modelpb.Batch) err
for i := range *b {
event := (*b)[i]
if event.Error != nil {
event.Message = s.setErrorMessage(event)
event.Error.Message = s.setErrorMessage(event)
}
}
return nil
Expand Down
3 changes: 1 addition & 2 deletions model/modelprocessor/errormessage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func TestSetErrorMessage(t *testing.T) {
processor := modelprocessor.SetErrorMessage{}
err := processor.ProcessBatch(context.Background(), &batch)
assert.NoError(t, err)
assert.Equal(t, test.message, batch[0].Message)
assert.Equal(t, test.message, batch[0].Error.Message)
}

}

0 comments on commit f8865c4

Please sign in to comment.