Skip to content

Commit 69eecb0

Browse files
committed
Merge branch 'remove-stacktrace-processor'
2 parents 7b0578a + 14d3fef commit 69eecb0

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Raven
2+
class Processor::RemoveStacktrace < Processor
3+
4+
def process(value)
5+
value['exception'].delete('stacktrace') if value['exception']
6+
7+
value
8+
end
9+
10+
end
11+
end
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'spec_helper'
2+
require 'raven/processor/removestacktrace'
3+
4+
describe Raven::Processor::RemoveStacktrace do
5+
before do
6+
@client = double("client")
7+
@processor = Raven::Processor::RemoveStacktrace.new(@client)
8+
end
9+
10+
it 'should remove stacktraces' do
11+
data = Raven::Event.capture_exception(build_exception).to_hash
12+
13+
expect(data['exception']['stacktrace']).to_not eq(nil)
14+
result = @processor.process(data)
15+
16+
expect(result['exception']['stacktrace']).to eq(nil)
17+
end
18+
19+
end

0 commit comments

Comments
 (0)