Commit b6646e77 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Track the locale in Sentry so we know which ones are failing

parent bf4ec606
......@@ -7,6 +7,8 @@ module Gitlab
def self.context(current_user = nil)
return unless self.enabled?
Raven.tags_context(locale: I18n.locale)
if current_user
Raven.user_context(
id: current_user.id,
......
require 'spec_helper'
describe Gitlab::Sentry do
describe '.context' do
it 'adds the locale to the tags' do
expect(described_class).to receive(:enabled?).and_return(true)
described_class.context(nil)
expect(Raven.tags_context[:locale]).to eq(I18n.locale.to_s)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment